Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

anetrob

Reviews(1)
byanetrob, November 22, 2011
Check_as400
This worked great for our Version 5 OS, but there we a couple of issues for 7.1.

Below are the changes to make the wrksyssts portions to work with 7.1
// else if(ARGS.checkVariable==DB){
// start=findToken(buffer,":",5)+1;
// double db=(new Double(checkDouble((buffer.substring(start,start+11)).trim()))).doubleValue();
//
// returnStatus=getStatus(db);
//
// System.out.println("DB Load ("+nf.format(db)+"%) | DBload="+nf.format(db)+";80;90;0; ");
// }
else if(ARGS.checkVariable==US){
double percentFree,total,percentUsed;

start=findToken(buffer,":",10)+1;
percentUsed=(new Double(checkDouble(buffer.substring(start,start+11)))).doubleValue();
start=findToken(buffer,":",10)+1;
percentFree=100.0-(new Double(checkDouble(buffer.substring(start,start+11)))).doubleValue();
// start=findToken(buffer,":",12)+1;
start=findToken(buffer,":",8)+1;
String tot=((buffer.substring(start,start+11))).trim();
total=(new Double(checkDouble(tot.substring(0,tot.length()-1)))).doubleValue();

returnStatus=getStatus(percentFree);

System.out.println(nf.format(total*(percentFree/100))+" "+tot.substring(tot.length()-1)+" ("+nf.format(percentFree)+"%) free of "+((buffer.substring(start,start+11))).trim()+" | ASP="+nf.format(percentUsed)+"%;87;92;0; ");
}
else if(ARGS.checkVariable==JOBS){
start=findToken(buffer,":",9)+1;
int jobs=(new Integer((buffer.substring(start,start+11)).trim())).intValue();

returnStatus=getStatus(jobs);

System.out.println(jobs+" jobs in system | jobs="+jobs+";;;0; ");