- scheduler: record VirtualBox version # in the host table

svn path=/trunk/boinc/; revision=24327
This commit is contained in:
David Anderson 2011-10-04 03:33:04 +00:00
parent c2cdaacf89
commit c84ede6156
4 changed files with 18 additions and 7 deletions

View File

@ -6751,3 +6751,11 @@ David 3 Oct 2011
sched/
sched_types.h
sched_send.cpp
David 3 Oct 2011
- scheduler: record VirtualBox version # in the host table
sched/
handle_request.cpp
lib/
coproc.cpp,h

View File

@ -47,6 +47,7 @@
#include "error_numbers.h"
#include "filesys.h"
#include "parse.h"
#include "str_replace.h"
#include "util.h"
#include "coproc.h"
@ -244,24 +245,22 @@ int COPROC::parse_opencl(XML_PARSER& xp) {
}
void COPROCS::summary_string(char* buf, int len) {
char bigbuf[8192], buf2[1024];
char buf2[1024];
strcpy(bigbuf, "");
strcpy(buf, "");
if (nvidia.count) {
int mem = (int)(nvidia.prop.dtotalGlobalMem/MEGA);
sprintf(buf2, "[CUDA|%s|%d|%dMB|%d]",
nvidia.prop.name, nvidia.count, mem, nvidia.display_driver_version
);
strcat(bigbuf, buf2);
strlcat(buf, buf2, len);
}
if (ati.count) {
sprintf(buf2,"[CAL|%s|%d|%dMB|%s]",
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) {

View File

@ -348,7 +348,7 @@ struct COPROCS {
std::vector<std::string> &warnings
);
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.
// used in round-robin simulator and CPU scheduler,

View File

@ -499,6 +499,10 @@ static int modify_host_struct(HOST& host) {
g_request->coprocs.summary_string(buf2, sizeof(buf2));
strlcpy(host.serialnum, buf, 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)) {
strncpy(host.last_ip_addr, g_request->host.last_ip_addr, sizeof(host.last_ip_addr));
} else {