mirror of https://github.com/BOINC/boinc.git
- Added <d_allowed> element to get_disk_usage GUI RPC
svn path=/trunk/boinc/; revision=15190
This commit is contained in:
parent
65e019daf5
commit
58b5f80366
|
@ -3913,3 +3913,15 @@ David May 12 2008
|
|||
cs_cmdline.C
|
||||
log_flags.C
|
||||
main.C
|
||||
|
||||
David May 13 2008
|
||||
- Added <d_allowed> element to get_disk_usage GUI RPC
|
||||
|
||||
client/
|
||||
gui_rpc_server_ops.C
|
||||
hostinfo_win.C
|
||||
clientgui/
|
||||
ViewResources.cpp
|
||||
lib/
|
||||
gui_rpc_client.h
|
||||
gui_rpc_client_ops.C
|
||||
|
|
|
@ -122,10 +122,10 @@ static void handle_get_project_status(MIOFILE& fout) {
|
|||
|
||||
static void handle_get_disk_usage(MIOFILE& fout) {
|
||||
unsigned int i;
|
||||
double size, d_total, d_free, d_boinc;
|
||||
double size, d_total, d_free, d_boinc, d_allowed;
|
||||
|
||||
fout.printf("<disk_usage_summary>\n");
|
||||
get_filesystem_info(d_total, d_free);
|
||||
get_filesystem_info(gstate.host_info.d_total, gstate.host_info.d_free);
|
||||
dir_size(".", d_boinc, false);
|
||||
dir_size("locale", size, false);
|
||||
d_boinc += size;
|
||||
|
@ -144,11 +144,13 @@ static void handle_get_disk_usage(MIOFILE& fout) {
|
|||
if (! err) d_boinc += manager_size;
|
||||
}
|
||||
#endif
|
||||
d_allowed = gstate.allowed_disk_usage();
|
||||
fout.printf(
|
||||
"<d_total>%f</d_total>\n"
|
||||
"<d_free>%f</d_free>\n"
|
||||
"<d_boinc>%f</d_boinc>\n",
|
||||
d_total, d_free, d_boinc
|
||||
"<d_boinc>%f</d_boinc>\n"
|
||||
"<d_allowed>%f</d_allowed>\n",
|
||||
d_total, d_free, d_boinc, d_allowed
|
||||
);
|
||||
for (i=0; i<gstate.projects.size(); i++) {
|
||||
PROJECT* p = gstate.projects[i];
|
||||
|
|
|
@ -626,42 +626,23 @@ int get_accelerators(
|
|||
}
|
||||
|
||||
|
||||
// Gets windows specific host information (not complete)
|
||||
// Gets host information; called on startup and before each sched RPC
|
||||
//
|
||||
int HOST_INFO::get_host_info() {
|
||||
|
||||
// Get timezone
|
||||
get_timezone(timezone);
|
||||
|
||||
// Detect the filesystem information
|
||||
get_filesystem_info(d_total, d_free);
|
||||
|
||||
// Detect the amount of memory the system has
|
||||
get_memory_info(m_nbytes, m_swap);
|
||||
|
||||
// Detect OS Information
|
||||
get_os_information(
|
||||
os_name, sizeof(os_name), os_version, sizeof(os_version)
|
||||
);
|
||||
|
||||
// Detect proccessor make and model.
|
||||
get_processor_info(
|
||||
p_vendor, sizeof(p_vendor),
|
||||
p_model, sizeof(p_model),
|
||||
p_features, sizeof(p_features)
|
||||
);
|
||||
|
||||
// Detect the number of CPUs
|
||||
get_processor_count(p_ncpus);
|
||||
|
||||
// Detect host name/ip info
|
||||
get_local_network_info();
|
||||
|
||||
// Detect which accelerators are installed on the system
|
||||
get_accelerators(
|
||||
accelerators, sizeof(accelerators)
|
||||
);
|
||||
|
||||
get_accelerators(accelerators, sizeof(accelerators));
|
||||
if (!strlen(host_cpid)) {
|
||||
generate_host_cpid();
|
||||
}
|
||||
|
|
|
@ -179,8 +179,7 @@ void CViewResources::OnListRender( wxTimerEvent& WXUNUSED(event) ) {
|
|||
//check for changes worth a refresh
|
||||
if(pDoc->disk_usage.projects.size() != m_pieCtrlBOINC->m_Series.size()) {
|
||||
refreshBOINC=true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
for (i=0; i<pDoc->disk_usage.projects.size(); i++) {
|
||||
wxString oldValue;
|
||||
wxString newValue;
|
||||
|
@ -244,19 +243,20 @@ void CViewResources::OnListRender( wxTimerEvent& WXUNUSED(event) ) {
|
|||
if(oldFree.Cmp(newFree)!=0) {
|
||||
refreshTotal=true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
refreshTotal=true;
|
||||
}
|
||||
if(refreshBOINC || refreshTotal) {
|
||||
m_pieCtrlTotal->m_Series.Clear();
|
||||
wxPiePart part;
|
||||
|
||||
//free disk space
|
||||
FormatDiskSpace(free,diskspace);
|
||||
part.SetLabel(_("free disk space - ") + diskspace);
|
||||
part.SetValue(free);
|
||||
part.SetColour(wxColour(238,238,238));
|
||||
m_pieCtrlTotal->m_Series.Add(part);
|
||||
|
||||
//used by boinc projects
|
||||
boinctotal += pDoc->disk_usage.d_boinc;
|
||||
FormatDiskSpace(boinctotal,diskspace);
|
||||
|
@ -264,6 +264,7 @@ void CViewResources::OnListRender( wxTimerEvent& WXUNUSED(event) ) {
|
|||
part.SetValue(boinctotal);
|
||||
part.SetColour(wxColour(0,0,0));
|
||||
m_pieCtrlTotal->m_Series.Add(part);
|
||||
|
||||
//used by others
|
||||
FormatDiskSpace(total-boinctotal-free,diskspace);
|
||||
part.SetLabel(_("used by other programs - ") + diskspace);
|
||||
|
|
17
doc/help.php
17
doc/help.php
|
@ -4,19 +4,9 @@ require_once("spoken_languages.php");
|
|||
require_once("help_db.php");
|
||||
require_once("../html/inc/translation.inc");
|
||||
|
||||
page_head(tr(HELP_TITLE));
|
||||
page_head("Live help via Internet phone or email");
|
||||
|
||||
echo "
|
||||
<h2>".tr(HELP_HEADING2)."</h2>
|
||||
<p>
|
||||
<ul>
|
||||
<li> <a href=trac/wiki/RunningBoinc>".tr(HELP_P2_ITEM1)."</a>
|
||||
<li> <a href=trac/wiki/TroubleshootClient>".tr(HELP_P2_ITEM2)."</a>
|
||||
<li> <a href=links.php>".tr(HELP_P2_ITEM3)."</a>
|
||||
<li> <a href=dev/>".tr(HELP_P2_ITEM4)."</a>
|
||||
<li> ".tr(HELP_P2_ITEM5)."
|
||||
</ul>
|
||||
<h2>".tr(HELP_HEADING1)."</h2>
|
||||
<p>
|
||||
".sprintf(tr(HELP_P1_1), "<ul><li>", "<li>", "<li>", "<li>")."
|
||||
</ul>
|
||||
|
@ -35,11 +25,8 @@ sort($langs);
|
|||
$n = 0;
|
||||
foreach ($langs as $lang) {
|
||||
$lang_enc = urlencode($lang);
|
||||
if (!$n) {
|
||||
} else if (!($n%5)) {
|
||||
if ($n) {
|
||||
echo "<br>";
|
||||
} else {
|
||||
echo " | ";
|
||||
}
|
||||
$n++;
|
||||
echo "<a href=help_lang.php?lang=$lang_enc><b>$lang</b></a>";
|
||||
|
|
|
@ -88,8 +88,8 @@ function show_participate() {
|
|||
<span class=section_title>".tr(HOME_HEADING1)."</span>
|
||||
<br>
|
||||
<a class=heading href=download.php><b>".tr(HOME_DOWNLOAD)."</b></a>
|
||||
· <a class=heading href=/wiki/index.php/BOINC_Help><b>Help</b></a>
|
||||
· <a class=heading href=wiki/index.php/User_Manual><b><nobr>Documentation</nobr></b></a>
|
||||
· <a class=heading href=links.php><b><nobr>Web sites</nobr></b></a>
|
||||
</center>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
|
|
|
@ -26,7 +26,7 @@ See:
|
|||
<li>
|
||||
<a href=wiki/index.php/Project_list>A complete list of projects</a>.
|
||||
<li>
|
||||
<a href=http://boinc.berkeley.edu/trac/wiki/ProjectPapers>
|
||||
<a href=/wiki/index.php/Publications_by_BOINC_projects>
|
||||
A list of scientific publications of projects</a>.
|
||||
</ul>
|
||||
The following projects are known to us;
|
||||
|
|
|
@ -356,6 +356,7 @@ struct DISK_USAGE {
|
|||
double d_total;
|
||||
double d_free;
|
||||
double d_boinc; // amount used by BOINC itself, not projects
|
||||
double d_allowed; // amount BOINC is allowed to use, total
|
||||
|
||||
DISK_USAGE(){clear();}
|
||||
~DISK_USAGE();
|
||||
|
|
|
@ -751,6 +751,7 @@ void DISK_USAGE::clear() {
|
|||
d_free = 0;
|
||||
d_total = 0;
|
||||
d_boinc = 0;
|
||||
d_allowed = 0;
|
||||
}
|
||||
|
||||
RESULTS::~RESULTS() {
|
||||
|
@ -1386,6 +1387,7 @@ int RPC_CLIENT::get_disk_usage(DISK_USAGE& du) {
|
|||
if (parse_double(buf, "<d_total>", du.d_total)) continue;
|
||||
if (parse_double(buf, "<d_free>", du.d_free)) continue;
|
||||
if (parse_double(buf, "<d_boinc>", du.d_boinc)) continue;
|
||||
if (parse_double(buf, "<d_allowed>", du.d_allowed)) continue;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
|
|
Loading…
Reference in New Issue