User:Yjzh1982

Creating database
./CrtandUpdtDtbs.py "data/accounting_log"

Other accounting_log must have the same structure with this accounting_log file located at Newton:

“/data/charmm/qviz data/accounting_log”.

The database structure is “stime INTEGER, jobid INTEGER, username TEXT, pgroup TEXT, cpuhours INTEGER, PRIMARY KEY (stime, jobid, username)”.

For the redundant records of accounting_log, I used “insert or replace” to create database, this can guarantee we get the longest record for each job.

The interval of stime is 3600 seconds (1hour). However, this database does not contain the records which cpuhours is equal to zero. So, I use “naccouting_2.py” to add all other records which cpuhours are equal to zero. The records limitation is from first start time to the last end time. For example, if the smallest start time is 1.26hour and the largest end time is 100000.63hour, the first start time is 1hour and the last end time is 100001hour.

Updating database
Because we donot know which job has stopped and which job is still running, we just re-creating database.

Processor utilization by projects in a time period
Entering: ./qvizNew.py "select pgroup, sum(ss) from (select pgroup, cpuhours ss from t3 where stime>=2010,10,15 and stime<2010,11,15) group by pgroup order by sum(ss) DESC" "piemain"

Parameter can be changed: start time (2010,10,15) and end time (2010,11,15).

Then users got:

Processor utilization by users in a selected pgroup in a time period
Entering: ./qvizNew.py "select username, sum(ss) from (select username, cpuhours ss from t3 where stime>=2010,10,15 and stime<2010,11,15 and pgroup='scaleit') group by username order by sum(ss) DESC" "pieuser"

Parameter can be changed: start time (2010,10,15), end time (2010,11,15) and pgroup (mrail).

Then users got:

Newton cluster usage by a selected pgroup for a period
Entering: ./qvizNew.py "select username, sum(ss) from (select username, cpuhours ss from t3 where stime>=2010,10,15 and stime<2011,02,15 and pgroup='scaleit') group by username order by sum(ss) DESC" "linemain"

Parameter can be changed: start time (2010,10,15), end time (2011,02,15) and pgroup (scaleit).

Then users got: