Parallel Workloads Archive: pbs2swf - Converting PBS Logs to SWF

pbs2swf - Converting PBS Logs to SWF

A Perl utility to convert between Portable Batch System (PBS) logs to Standard Workload Format (SWF).



Table of Content:



pbs2swf - Download:

The file pbs2swf.tgz contains all the files that compose the pbs2swf utility. These are:

# file description
1 pbs2swf.pl The conversion script. Uses the modules below.
2 ConversionConfig.pm Some global configuration variables ("constants") that are used throughout.
3 ConversionLog.pm Everything related to creating the conversion summary report..
4 ParseArgv.pm Parsing command line arguments of pbs2swf.pl and setting ConversionConfig.pm accordingly.
5 ParsePBS.pm Perform the actual parsing of PBS logs.
6 PrintSWF.pm Print the data parsed by ParsePBS.pm in SWF format.



pbs2swf - Example:



pbs2swf - Usage:

The synopsis of pbs2swf.pl is:

    ./pbs2swf.pl <options> [PBS log(s)]
such that if no PBS files are given, pbs2swf.pl will attempt to read the PBS log(s) from stdin. The pbs2swf.pl script generates two files. See the --output option below.

The following is a description of all the available options ('mandatory' options must appear in the command line; 'multiple' options may appear more than once in the command line):

option group
option
m
a
n
d
a
t
o
r
y
m
u
l
t
i
p
l
e
default value
usage
Defaults to SWF fields wait       Synopsis of the values associated with these flags:
     <default_value>,<all|started|canceled>[,overwrite] 
There's an option for each SWF fields that can possibly be effected by user's choice. For example, --proc_req=10,all means that all jobs, for which the requested-processor were unobtainable from the PBS log, will be assigned with 10 in this field. If this is given: --proc_req=10,all,overwrite, then 10 will be assigned to be the requested-processor of all the jobs, regardless of whether the associated data exists in the original PBS logs or not. Finally, if this is given --proc_req=10,canceled then only jobs that were canceled before they were started are effected (note that once again, 'overwrite' is optional). Similarly, using 'started' will only effect jobs that were actually started.
Time fields are specified in seconds, and memory fields are specified in KB.
proc_req      
cpu_req      
mem_req      
uid      
gid      
executable      
queue      
partition      
runtime       The synopsis of the values associated with these flags is:
     <default_value>,<started>[,overwrite] 
This is similar in every respect to group of flags explained above, but this fields only have meaning for jobs that were actually started. And so a --runtime=3600,started means all jobs that are missing a runtime data in the original PBS logs will be assigned with a 1-hour runtime.
proc_used      
cpu_used      
mem_used      
Attributes of SWF fields mem_used.type     virtual The values associated with 'type' attributes are either 'physical' or 'virtual'. The values associated with 'quantity' attributes are either 'per_job' or 'per_process' (resource was consumed by a single process; to know the amount of resource consumed by the entire job one must multiple this with the job's size). For example, --mem_used.quantity=per_job means that the associated SWF column specifies the aggregated amount of memory used by all the processes composing the job.
mem_req.type     virtual
mem_used.quantity     per_job
mem_req.quantity     per_job
cpu_used.quantity     per_process
Anonymizing PBS values anonymize.uid     Synopsis of the values associated with these flags:
    <PBS_value>:<SWF_code>
The pbs2swf.pl script arbitrarily replaces every PBS string representing user/group/executable/queue/partition with an SWF code (but does so consistently, that is, once a PBS value is associated with an arbitrary SWF-code, the code will always be used to represent this PBS value). These options gives control to the converter on how the anonymization will actually be performed (which values will be used for which PBS names). And so, for example, --anonymize.queue=short:1 means that the PBS 'short' queue will be represented by 1 in the resulting SWF file.
See the pbs2swf - Example to understand why these options can be useful.
anonymize.gid    
anonymize.executable    
anonymize.queue    
anonymize.partition    
Predefined SWF header fields Computer   <short machine description> e.g. "P-III Linux cluster"
Installation   <location and name of machine> e.g. "SDSC - Blue Horizon"
Information   <where find additional info> usually URL and possibly a paper-ref
Acknowledge   <name+email of supplier of PBS data>
Conversion   <name+email of converter and possibly additional conversion info>
TimeZoneString     <verbal time zone of PBS log> a file which is (usually) found in /usr/share/zoneinfo/, e.g. US/Alaska
MaxNodes     <int> [comment] e.g. "72 (dual CPU)"
MaxProcs     <int> [comment] e.g. "144"
MaxRuntime       <seconds> administrative max allowed runtime
MaxMemory       <KB> administrative max allowed memory
AllowOveruse       <bool> can jobs use more resource(s) than requested?
Queues     <verbal information about queues>
Partitions     <verbal information about partitions>
Note     <any important note>
Other output     <prefix name for the result file e.g., "l_sdsc_sp2"> In this example, pbs2swf.pl generates both l_sdsc_sp2.swf (the actual conversion), and l_sdsc_sp2.conversion.txt (reporting various statistics and problems). Here's an example of a conversion summary file.
help       print a help message
debug       <0|1> 1 means an added a 19-th field will be added to the resulting SWF file that holds the original PBS-ID of the job



Parsing a PBS log file:



Parsing a PBS log record:



Parallel Workloads Archive - Logs