| 1 |
//---PACKAGE DECLARATION--- |
| 2 |
|
| 3 |
//---IMPORTS--- |
| 4 |
import java.sql.*; |
| 5 |
|
| 6 |
/** |
| 7 |
* Produces a report of the total number of processes running |
| 8 |
* on a host. |
| 9 |
* |
| 10 |
* @author $Author: $ |
| 11 |
* @version $Id: $ |
| 12 |
*/ |
| 13 |
public class ProcessesTotalReport extends Report { |
| 14 |
|
| 15 |
//---FINAL ATTRIBUTES--- |
| 16 |
|
| 17 |
//---STATIC METHODS--- |
| 18 |
|
| 19 |
//---CONSTRUCTORS--- |
| 20 |
|
| 21 |
public ProcessesTotalReport(String directory, Statement stmt, String machine_name, long startDate, long endDate){ |
| 22 |
super (directory, stmt, machine_name, startDate, endDate); |
| 23 |
|
| 24 |
// Use this from the parameter table. |
| 25 |
_reportField = "packet.processes.total"; |
| 26 |
|
| 27 |
// Use this select query. |
| 28 |
_sql = "SELECT receipt_date, value FROM packet_test pkt, parameter_test param WHERE pkt.id=param.packet_id AND pkt.machine_name='"+ _machine_name+"' AND pkt.receipt_date >= "+_startDate+" AND pkt.receipt_date <= "+_endDate+" AND param.name='"+_reportField+"' ORDER BY pkt.receipt_date;"; |
| 29 |
|
| 30 |
} |
| 31 |
|
| 32 |
//---PUBLIC METHODS--- |
| 33 |
|
| 34 |
//---PRIVATE METHODS--- |
| 35 |
|
| 36 |
//---ACCESSOR/MUTATOR METHODS--- |
| 37 |
|
| 38 |
//---ATTRIBUTES--- |
| 39 |
|
| 40 |
//---STATIC ATTRIBUTES--- |
| 41 |
|
| 42 |
} |