Re: Xstatsgraph and xstatsclass network graph
Brian Wolven <[email protected]>
| Newsgroups | gmane.comp.windows.shells.litestep |
|---|---|
| Message-ID | <[email protected]> |
Hale, Paul wrote:
> Now matter what I try, I cannot get my network graph to work when I use
> xtatsclass. It works fine for CPU, so why not network?
>
> Here is one part of the config:
>
> *GraphMinor_Source NetPerf2_
> NetPerf2_ xstatsclass
> NetPerf2_SourceString "[netin]"
> NetPerf2_RefreshRate 500
>
> *GraphMinor_Meter Graph4_
> Graph4_X 1
> Graph4_Y 1
> Graph4_Width $GraphMinor_Width-2$
> Graph4_Height $GraphMinor_Height-2$
> Graph4_RenderMode FillAndStroke
> Graph4_Orientation vertical
> Graph4_StrokeColor $ecsActiveCaptionColor$
> Graph4_FillColor $ecsGradientActiveCaptionColor$
> Graph4_Source NetPerf2_
> Graph4_Scale 12500
>
> I have tried setting the NetPerf2_SourceString to "[netin]" or just
> [netin], [netin(0)], [netin(1)] and it just doesn't work.
>
> Anybody have an example they wouldn't mind posting would be appreciated!
The big chunk of code below uses the performance counters to get the info for
upload and download (shown on the same meter); you'd have to modify the net
adapter name to make this work for you. Alternatively you can use xstatsclass,
but modify the strings like this:
pNtISource xstatsclass
pNtISourcestring "[before(netin('0'),'.')]"
Using performance counters:
*xStatsGraph xNet
*meterNetModuleHook !xStatsGraphHook xNet
xNetX $xMeterMarginX+tlNetWidth$
xNetY $xMeterMarginY$
xNetHeight $xMeterGroupHeight$
xNetWidth $xMeterGroupWidth$
xNetPaintingMode .multicolor
xNetColors $GlobalColors$
xNetBevels $xMeterBevels$
xNetBorderMethod .none
xNetAlwaysOnTop true
*xNetMeter mNtO
mNtOX $xNetBevels$
mNtOY $xNetBevels$
mNtOHeight $xNetHeight-2*xNetBevels$
mNtOWidth $xNetWidth-2*xNetBevels$
mNtORefreshRate 1000
mNtOScale 12500000
mNtORenderMode StrokeOnly ; FillAndStroke
mNtOFillAlpha $xMeterAltFillAlpha$
mNtOStrokeAlpha $xMeterAltStrokeAlpha$
mNtOFillColor $xMeterAltFillColor$
mNtOStrokeColor $xMeterAltStrokeColor$
mNtOSource pNtO
*xNetSource pNtO
pNtORefreshRate 500
pNtOSource perfmon
pNtOSourceString "\Network Interface(Intel[R] PRO_1000 MT Network Connection -
Packet Scheduler Miniport)\Bytes Sent/sec"
;pNtOSourceString "\Network Interface(D-Link Air DWL-120 Wireless USB
Adapter[rev.F])\Bytes Sent/sec"
*xNetMeter mNtI
mNtIX $xNetBevels$
mNtIY $xNetBevels$
mNtIHeight $xNetHeight-2*xNetBevels$
mNtIWidth $xNetWidth-2*xNetBevels$
mNtIRefreshRate 1000
mNtIScale 12500000
mNtIRenderMode FillAndStroke
mNtIFillAlpha $xMeterFillAlpha$
mNtIStrokeAlpha $xMeterStrokeAlpha$
mNtIFillColor $xMeterFillColor$
mNtIStrokeColor $xMeterStrokeColor$
mNtISource pNtI
*xNetSource pNtI
pNtIRefreshRate 500
pNtISource perfmon
pNtISourceString "\Network Interface(Intel[R] PRO_1000 MT Network Connection -
Packet Scheduler Miniport)\Bytes Received/sec"
;pNtISourceString "\Network Interface(D-Link Air DWL-120 Wireless USB
Adapter[rev.F])\Bytes Received/sec"
---------------------------------------------------------------------
Can't Unsubscribe? Check http://desktopian.org/listunsub.html
LS List Homepage: http://wuzzle.org/list/litestep.php
Get the LS FAQ: http://lsfaq.shellfront.org