mirror of https://github.com/BOINC/boinc.git
- scheduler: record VirtualBox version # in the host table
svn path=/trunk/boinc/; revision=24327
This commit is contained in:
parent
c2cdaacf89
commit
c84ede6156
|
@ -6751,3 +6751,11 @@ David 3 Oct 2011
|
||||||
sched/
|
sched/
|
||||||
sched_types.h
|
sched_types.h
|
||||||
sched_send.cpp
|
sched_send.cpp
|
||||||
|
|
||||||
|
David 3 Oct 2011
|
||||||
|
- scheduler: record VirtualBox version # in the host table
|
||||||
|
|
||||||
|
sched/
|
||||||
|
handle_request.cpp
|
||||||
|
lib/
|
||||||
|
coproc.cpp,h
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "error_numbers.h"
|
#include "error_numbers.h"
|
||||||
#include "filesys.h"
|
#include "filesys.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
|
#include "str_replace.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#include "coproc.h"
|
#include "coproc.h"
|
||||||
|
@ -244,24 +245,22 @@ int COPROC::parse_opencl(XML_PARSER& xp) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void COPROCS::summary_string(char* buf, int len) {
|
void COPROCS::summary_string(char* buf, int len) {
|
||||||
char bigbuf[8192], buf2[1024];
|
char buf2[1024];
|
||||||
|
|
||||||
strcpy(bigbuf, "");
|
strcpy(buf, "");
|
||||||
if (nvidia.count) {
|
if (nvidia.count) {
|
||||||
int mem = (int)(nvidia.prop.dtotalGlobalMem/MEGA);
|
int mem = (int)(nvidia.prop.dtotalGlobalMem/MEGA);
|
||||||
sprintf(buf2, "[CUDA|%s|%d|%dMB|%d]",
|
sprintf(buf2, "[CUDA|%s|%d|%dMB|%d]",
|
||||||
nvidia.prop.name, nvidia.count, mem, nvidia.display_driver_version
|
nvidia.prop.name, nvidia.count, mem, nvidia.display_driver_version
|
||||||
);
|
);
|
||||||
strcat(bigbuf, buf2);
|
strlcat(buf, buf2, len);
|
||||||
}
|
}
|
||||||
if (ati.count) {
|
if (ati.count) {
|
||||||
sprintf(buf2,"[CAL|%s|%d|%dMB|%s]",
|
sprintf(buf2,"[CAL|%s|%d|%dMB|%s]",
|
||||||
ati.name, ati.count, ati.attribs.localRAM, ati.version
|
ati.name, ati.count, ati.attribs.localRAM, ati.version
|
||||||
);
|
);
|
||||||
strcat(bigbuf,buf2);
|
strlcat(buf, buf2, len);
|
||||||
}
|
}
|
||||||
bigbuf[len-1] = 0;
|
|
||||||
strcpy(buf, bigbuf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int COPROCS::parse(XML_PARSER& xp) {
|
int COPROCS::parse(XML_PARSER& xp) {
|
||||||
|
|
|
@ -348,7 +348,7 @@ struct COPROCS {
|
||||||
std::vector<std::string> &warnings
|
std::vector<std::string> &warnings
|
||||||
);
|
);
|
||||||
int parse(XML_PARSER&);
|
int parse(XML_PARSER&);
|
||||||
void summary_string(char*, int);
|
void summary_string(char* buf, int len);
|
||||||
|
|
||||||
// Copy a coproc set, possibly setting usage to zero.
|
// Copy a coproc set, possibly setting usage to zero.
|
||||||
// used in round-robin simulator and CPU scheduler,
|
// used in round-robin simulator and CPU scheduler,
|
||||||
|
|
|
@ -499,6 +499,10 @@ static int modify_host_struct(HOST& host) {
|
||||||
g_request->coprocs.summary_string(buf2, sizeof(buf2));
|
g_request->coprocs.summary_string(buf2, sizeof(buf2));
|
||||||
strlcpy(host.serialnum, buf, sizeof(host.serialnum));
|
strlcpy(host.serialnum, buf, sizeof(host.serialnum));
|
||||||
strlcat(host.serialnum, buf2, sizeof(host.serialnum));
|
strlcat(host.serialnum, buf2, sizeof(host.serialnum));
|
||||||
|
if (strlen(host.virtualbox_version)) {
|
||||||
|
sprintf(buf2, "[vbox|%s]", host.virtualbox_version);
|
||||||
|
strlcat(host.serialnum, buf2, sizeof(host.serialnum));
|
||||||
|
}
|
||||||
if (strcmp(host.last_ip_addr, g_request->host.last_ip_addr)) {
|
if (strcmp(host.last_ip_addr, g_request->host.last_ip_addr)) {
|
||||||
strncpy(host.last_ip_addr, g_request->host.last_ip_addr, sizeof(host.last_ip_addr));
|
strncpy(host.last_ip_addr, g_request->host.last_ip_addr, sizeof(host.last_ip_addr));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue