Solved

rstat() and perfmeter

Posted on 1998-12-14
4
329 Views
Last Modified: 2013-12-23
Does perfmeter (Solaris-openwin) use rstat()?
I need some data like perfmeter, how could I get it from rstat()? Is there another way to get perfomance status of host?
0
Comment
Question by:No00
  • 2
4 Comments
 
LVL 2

Expert Comment

by:rdelfino
ID: 1582715

It probably uses rstat (chances are 99%).

try this:

statstime st;
if (rstat("yourhost", &st) != RPC_SUCCESS)
{
    /* error . . .*/
}
else
{
printf("Load  average %f %f %f,
 (double) st.avenrun[0]/FSCALE,
 (double) st.avenrun[1]/FSCALE,
 (double) st.avenrun[2]/FSCALE);
}

There's many data on statstime struct. Try looking
at the <rpcsvc/rstat.h> file to figure out what each field mean.

I hope it helps

Reginaldo

0
 

Author Comment

by:No00
ID: 1582716
Thanks rdelfino!
But rstat.h doesn't tell me how to evalute %cpu, %packets, %page,
etc.
0
 
LVL 22

Accepted Solution

by:
blu earned 50 total points
ID: 1582717
It does use rstat.

%CPU is the percentage of the time the cpu was in user or system
state, versus the idle state.

I don't see any %packets, or %page, the packets and page
numbers are the total number of packets or pages in the interval.

0
 
LVL 2

Expert Comment

by:rdelfino
ID: 1582718
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question