Python API: samMis v8_1_5 samMis.plotConsumption()
|  |
This is the python interface to the command 'sammis plot consumption'.
Command Description:
Generate the consumption plot for *all* stations, as well as for
the individual stations listed with the "--station-list=s1,s2,..." option.
The individual plots may be re-generated using the commands
sammis plot consumed [files|events|gbytes] ...
with appropriate options; but since we generate all of these plots
on a regular basis, it is much more efficient to do it with a minimum
of command parsing and SQL querying. Hence, all of the consumption plots
that we generate as part of our 'usual' D0 sam diagnostics have been gathered
into one script which runs in about half an hour (instead of over
the course of several hours to days).
The plots that are generated by default are:
pastDay-consumedFiles, pastDay-consumedGbytes, pastDay-consumedEvents,
pastWeek-consumedFiles, pastWeek-consumedGbytes, pastWeek-consumedEvents,
pastMonth-consumedFiles, pastMonth-consumedGbytes, pastMonth-consumedEvents,
pastYear-consumedFiles, pastYear-consumedGbytes, pastYear-consumedEvents,
all-consumedFiles, all-consumedGbytes, all-consumedEvents,
plus the integrated total of each of the above; plus the same for each specified
station, unless specified otherwise by the commandline.
You may use "--start-date=dd-mon-yyyy --end-date=dd-mon-yyyy" to
specify particular dates, overriding the default plot dates.
You may use "--all" along with "--nodaily", "--noweekly", etc.,
OR, "--noall" along with "--daily", "--weekly", etc.,
to produce a subset of the default plots.
The default if no start-date, end-date, etc., is specified, is "--all".
Python Usage:
from SamMis import samMis
result = samMis.plotConsumption(...)
Return value:
Arguments are passed as keyword-value pairs, as in:
myfunc(arg1='myarg', arg2='anotherarg', d=1)
Argument Keyword Description:
(*) indicates that this keyword is required
>>> indicates that either the API object or the CLI equivalent (<<<) is required
====================================================================================================================================
KEYWORD DATA TYPE DESCRIPTION
------------------------------------------------------------------------------------------------------------------------------------
all SamBoolean create all plots except those turned off on the command line
c SamBoolean automatically close all servants after each method call
corbaCallTimeout int time in seconds for CORBA method calls to return before timing out (default: 0; zero implies no timeout)
d SamBoolean debug mode
daily SamBoolean create the plot for the past 24 hours
endDate SamTime end of a particular date range for which to make plots (dd-mon-yyyy); default TODAY
monthly SamBoolean create the plot for the past month
noall SamBoolean do not create any plots except those specified on the command line
nodaily SamBoolean skip the plot for the past 24 hours
nohtml SamBoolean do not generate an HTML page wrapping the standard plots
nomonthly SamBoolean skip the plot for the past month
nostartOfTime SamBoolean skip the plot for cumulative totals since time began
noweekly SamBoolean skip the plot for the past 7 days
noyearly SamBoolean skip the plot for the past year
output string output file base name, for user-specified date ranges (ignored otherwise)
retryInterval int retry interval base in seconds; will multiply this base times retryCount (default: 5)
retryJitter int retry jitter, random jitter added to base retry interval times retryCount (default: 5)
retryMaxCount int number of times to retry CORBA calls for retriable exceptions (default: 25; zero implies no retries)
reuseColors SamBoolean re-use the colors in the color palatte (by default turned OFF; merge stragglers as "other")
s SamBoolean retrySilently mode (do not issue messages to stderr on proxy retries)
startDate SamTime beginning of a particular date range for which to make plots (dd-mon-yyyy)
startOfTime SamBoolean create the plot for cumulative totals since time began
stationList SamStringList comma-separated list of stations for which to generate consumption plots
t SamBoolean time-it mode (print additional info on timings)
v SamBoolean verbose mode
weekly SamBoolean create the plot for the past 7 days
yearly SamBoolean create the plot for the past year
====================================================================================================================================
Mutually exclusive keywords:
(all || noall)
(daily || nodaily)
(monthly || nomonthly)
(start-of-time || nostart-of-time)
(weekly || noweekly)
(yearly || noyearly)
Incompatible keyword combinations:
(noall, daily, weekly, monthly, yearly, start-of-time) OR (start-date, end-date) OR (all, nodaily, noweekly, nomonthly,
noyearly, nostart-of-time)
Environment Defaults:
c = os.environ['SAM_PYAPI_AUTO_CLOSE_SERVANTS']
corbaCallTimeout = os.environ['SAM_PYAPI_CORBA_CALL_TIMEOUT']
retryInterval = os.environ['SAM_PYAPI_RETRY_INTERVAL']
retryJitter = os.environ['SAM_PYAPI_RETRY_JITTER']
retryMaxCount = os.environ['SAM_PYAPI_RETRY_MAX_COUNT']
s = os.environ['SAM_PYAPI_RETRY_SILENTLY']
See Also: