I'd like to log and graph the cpu utilization of a process as well as # of users on the same graph.
To get the cpu process information im taking a value from /proc/<pic>/stat which conforms to the COUNTER DS type (i believe). But the # of current users is just a # that goes up or down and reflects the current # of users on the system. Ideally I'd like a graph that shows 1 line (or area) with cpu utilization and a 2nd line showing the # of users. Initially I tried doing this with MRTG (with rrdtool as the backend) but MRTG even with rrdtool on the backend doesn't allow you to choose DS types PER DS, just per rrd. So then I decided to create an rrd manually, I came up with something like: rrdtool create test.rrd DS:cpu:COUNTER:300:U:U DS:users:GAUGE:300:U:U RRA:AVERAGE:0.5:1:288 I then update the database using something like rrdtool update test.rrd N:`./getcpu`:`./getusers` typical output from ./getcpu would be something like 3570 (and the next cycle could be 3925 or 4925 etc) typical output from ./getusers would be something like 13 (and the next cycle could be 9 or 17 etc) Am I doing this correctly? Is it possible to mix COUNTER and GAUGE DS's on the same graph? In the example I posted I only used a single RRA, though I would probably expand that in the future to include more MRTG-like RRA's for Weekly, Monthly, Yearly, etc. I think it's possible to graph DS's from 2 different RRD's, should I just keep the COUNTER in 1 RRD and the GAUGE in a seperate one? Thanks for the help -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
