Changes between Initial Version and Version 1 of StatusApi


Ignore:
Timestamp:
May 29, 2011, 8:49:04 PM (13 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • StatusApi

    v1 v1  
     1= Startup and status data =
     2
     3== Getting startup data ==
     4
     5The following functions return startup data:
     6
     7{{{
     8#!c++
     9int boinc_get_init_data_p(APP_INIT_DATA*);
     10int boinc_get_init_data(APP_INIT_DATA&);
     11
     12struct APP_INIT_DATA {
     13    int major_version;
     14    int minor_version;
     15    int release;
     16    int app_version;
     17    char app_name[256];
     18    char symstore[256];
     19    char acct_mgr_url[256];
     20    char* project_preferences;
     21    int hostid;
     22    char user_name[256];
     23    char team_name[256];
     24    char project_dir[256];
     25    char boinc_dir[256];
     26    char wu_name[256];
     27    char authenticator[256];
     28    int slot;
     29    double user_total_credit;
     30    double user_expavg_credit;
     31    double host_total_credit;
     32    double host_expavg_credit;
     33    double resource_share_fraction;
     34    HOST_INFO host_info;
     35    PROXY_INFO proxy_info;  // in case app wants to use network
     36    GLOBAL_PREFS global_prefs;
     37    double starting_elapsed_time;
     38
     39    // info about the WU
     40    double rsc_fpops_est;
     41    double rsc_fpops_bound;
     42    double rsc_memory_bound;
     43    double rsc_disk_bound;
     44
     45    // the following are used for compound apps,
     46    // where each stage of the computation is a fixed
     47    // fraction of the total.
     48    double fraction_done_start;
     49    double fraction_done_end;
     50};
     51}}}
     52
     53to get the following information:
     54
     55||'''core version'''||The version number of the core client||
     56||'''app_name'''||The application name (from the server's DB)||
     57||'''project_preferences'''||An XML string containing the user's project-specific preferences.||
     58||'''user_name'''||The user's 'screen name' on this project.||
     59||'''team_name'''||The user's team name, if any.||
     60||'''project_dir'''||Absolute path of project directory||
     61||'''boinc_dir'''||Absolute path of BOINC root directory||
     62||'''wu_name'''||Name of workunit being processed||
     63||'''authenticator'''||User's authenticator for this project||
     64||'''slot'''||The number of the app's 'slot'||
     65||'''user_total_credit'''||User's total work for this project.||
     66||'''user_expavg_credit'''||User's recent average work per day.||
     67||'''team_total_credit'''||Team's total work for this project.||
     68||'''team_expavg_credit'''||Team's recent average work per day.||
     69||'''host_info'''||A structure describing the host hardware and OS||
     70||'''starting_elapsed_time'''||Elapsed time, counting previous episodes (provided only by 6.10 and later clients)||
     71
     72== Getting runtime system status ==
     73
     74The status of the runtime system is represented by the following structure:
     75{{{
     76typedef struct BOINC_STATUS {
     77    int no_heartbeat;
     78    int suspended;
     79    int quit_request;
     80    int reread_init_data_file;
     81    int abort_request;
     82    double working_set_size;
     83    double max_working_set_size;
     84    int network_suspended;
     85} BOINC_STATUS;
     86}}}
     87
     88'''no_heartbeat''':: no heartbeat from client; clean up and exit(0).
     89'''suspended''':: the client has requested that we suspend ourself.
     90'''quit_request''':: the client has requested that we exit (will restart).
     91'''reread_init_data_file''': project preferences have changed; reread them if needed.
     92'''abort_request''': the client has request that we abort (no restart).
     93'''working_set_size''':: our current working-set size
     94'''max_working_set_size''':: the amount of available RAM
     95'''network_suspended''':: set of network activity is not currently allowed
     96
     97You can get the current status using
     98
     99{{{
     100void boinc_get_status(BOINC_STATUS*);
     101}}}