I've scripted up a job that will run xnmgraph repeatedly during the day and night in order to generate xnmgraph.xwd output files which can be ftp'd to our web server for reporting.
The problem is that xnmgraph doesn't really seem designed as a batch tool. That is, I can find no way to avoid the need for a dedicated workstation running an X session.
I'm using the "-printOnly" option which appears intended for this kind of batch work, but -- as the man page indicates -- the graph still needs to be displayed first. Whatever DISPLAY address the batch environment is set to will briefly display the graph window. Unless the DISPLAY is set to a server or workstation running an active X session (NOT one that's locked), the graph doesn't get generated correctly.
-printOnly
After the graph first displays, print the graph using the print
resource, see /usr/OV/app-defaults/XNm, then exit. This feature is
very useful for generating many graphs in batch mode, such as a cron
job once a month to show network statistics for that month. See Sig-
nals for information about using signals.
I'd really like a way to generate these graphs without the need for such a kludgey solution. Any suggestions?
Mark Lemire
John Hancock Financial Services
|