|
NAMErwsiteinfo - Print information from the silk.conf site configuration fileSYNOPSISrwsiteinfo --fields=FIELD[,FIELD...] { [--classes=CLASS[,CLASS...]] [--types=TYPE[,TYPE...]] | [--flowtypes=CLASS/TYPE[,CLASS/TYPE...]] } [--sensors=SENSOR[,SENSOR...]] [--data-rootdir=ROOT_DIRECTORY] [--site-config-file=FILENAME] [--timestamp-format=FORMAT] [--no-titles] [--no-columns] [--column-separator=CHAR] [--no-final-delimiter] [{--delimited | --delimited=CHAR}] [--list-delimiter=CHAR] [--output-path=PATH] [--pager=PAGER_PROG] rwsiteinfo --help rwsiteinfo --help-fields rwsiteinfo --version DESCRIPTIONrwsiteinfo is a utility to print selected information about the classes, types, flowtypes, and sensors that are defined in the silk.conf(5) site configuration file. The --fields switch is required, and its argument is a comma-separated list of field names selecting the fields to be printed. The output from rwsiteinfo consists of multiple columns and rows, where each column contains one of the FIELDs and where each row has a unique value for one of the FIELDs. rwsiteinfo prints rows until all possible combinations of fields is exhausted. By default, the information is printed in a columnar, bar ("|") delimited format.As of SiLK 3.11.0, rwsiteinfo can visit the files in the data repository to report the date of the earliest (oldest) file in the repository, the date of the latest (most recent) file in the repository, and the number of files in the repository. These values are reported individually for each row in the output. Note: If your data repository is large, scanning it may take a long time. The --classes, --types, --flowtypes, and --sensors switches allow the user to limit the amount of information printed. (These switches operate similarly to their namesakes on rwfilter(1) and rwfglob(1).) If none of these switches are given, rwsiteinfo prints information for all values defined in the silk.conf file. If one or more of these switches is specified, rwsiteinfo limits its output to the specified values. To print information about the default class or the default types within a class, use the at-sign ("@") as the name of the class or type, respectively. The --flowtypes switch must be used independently of the --classes and --types switches. As stated above, rwsiteinfo prints unique rows given a list of FIELDs. As an example, suppose the user entered the command "rwsiteinfo --fields=class,type,sensor". rwsiteinfo will print a row containing the first class defined in the silk.conf file, the first type defined for that class, and the first sensor name defined for that class/type pair. On the next row, the class and type will be the same and the second sensor name will be printed. Once all sensors have been printed, rwsiteinfo repeats the process for the second type defined for the first class, and so on. Once all information for the first class has been printed, the process would repeat for the next class, until all classes have been printed. The order of the FIELDs determines how rwsiteinfo iterates through the possible values. The last FIELD will change most rapidly, and the first field will change most slowly. Two invocations of rwsiteinfo where the first specifies "--fields=class,sensor" and the second specifies "--fields=sensor,class" produce the same number of rows, and each invocation has an outer and inner iterator. In the first invocation, the outer iterator is over the classes, and the inner iterator is over each sensor defined in that class. In the second invocation, the outer iterator is over the sensors, and the inner is over the classes to which that sensor belongs. In general, the output will contain some combination of class, type, flowtype, and sensor. For flowtype and sensor, the numeric ID may be printed instead of the name. For class and type, the default values may be printed or they may be identified by a symbol. Most field names support a FIELD:list variant that puts all possible values for that field into a single column. See the description of the --fields switch below for details. OPTIONSOption names may be abbreviated if the abbreviation is unique or is an exact match for an option. A parameter to an option may be specified as --arg=param or --arg param, though the first form is required for options that take optional parameters.
When a timezone is specified, it is used regardless of the default timezone support compiled into SiLK. The timezone is one of:
EXAMPLESIn the following examples, the dollar sign ("$") represents the shell prompt. The text after the dollar sign represents the command line. Lines have been wrapped for improved readability, and the back slash ("\") is used to indicate a wrapped line. The output from these examples is based on the sample silk.conf as distributed for the twoway site (c.f. packlogic-twoway(3)).The following prints all known sensor names, one name per line: $ rwsiteinfo --fields=sensor --no-titles --delimited S0 S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 S14 The following prints all known sensor names on a single line (the names will be separated by comma): $ rwsiteinfo --fields=sensor:list --no-titles --delimited S0,S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14 This changes the output from the previous example to use a space as the separator: $ rwsiteinfo --fields=sensor:list --no-titles --delimited \ --list-delimiter=' ' S0 S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 S14 The following prints the sensor names for the default class on a single line: $ rwsiteinfo --fields=sensor:list --class=@ --no-titles --delimited S0,S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14 This shows the numeric sensor IDs: $ rwsiteinfo --fields=id-sensor:list Sensor-ID:list| 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14| The following prints four columns: (1) the sensor identifier, (2) the sensor name, (3) the list of classes for that sensor, and (4) a description of the sensor. This output mimics the output of the deprecated mapsid(1) tool. $ rwsiteinfo --fields=id-sensor,sensor,class:list,describe-sensor Sensor-ID|Sensor|Class:list| Sensor-Description| 0| S0| all| Description for sensor S0| 1| S1| all| | 2| S2| all|Optional description for sensor S2| 3| S3| all| | 4| S4| all| | 5| S5| all| | 6| S6| all| | 7| S7| all| | 8| S8| all| | 9| S9| all| | 10| S10| all| | 11| S11| all| | 12| S12| all| | 13| S13| all| | 14| S14| all| | This prints three columns: the first contains the class, the second contains the type, and the third uses a "+" to mark rows for the default class and a "*" to mark rows for a default type. $ rwsiteinfo --fields=class,type,mark-default Class| Type|Defaults| all| in| +*| all| out| + | all| inweb| +*| all| outweb| + | all| innull| + | all|outnull| + | all|int2int| + | all|ext2ext| + | all| inicmp| +*| all|outicmp| + | all| other| + | The following prints two columns, the first containing a class name and the second the list of default types for that class: $ rwsiteinfo --fields=class,default-type:list Class|Default-Type:list| all| in,inweb,inicmp| The following prints the default types. (The output contains the default type for each class, but twoway site has a single class.) $ rwsiteinfo --fields=default-type --no-titles --delimited in inweb inicmp This does the same (by limiting the output the default types). $ rwsiteinfo --fields=type --types=@ --no-titles --delimited all The following prints the class, the sensor, and the type. The number of rows of output (excluding the title) is the product of the number of classes, number of types, and number of sensors. $ rwsiteinfo --fields=class,sensor,type Class|Sensor| Type| all| S0| in| all| S0| out| all| S0| inweb| all| S0| outweb| all| S0| innull| all| S0|outnull| all| S0|int2int| all| S0|ext2ext| all| S0| inicmp| all| S0|outicmp| all| S0| other| all| S1| in| all| S1| out| ... all| S14|outicmp| all| S14| other| The repo-start-date, repo-end-date, and repo-file-count fields print the range of available dates for the files in the repository. The following shows information about files in the repository for the repository as a whole: $ rwsiteinfo --fields=repo-start-date,repo-end-date,repo-file-count Start-Date| End-Date|File-Count| 2009/02/12T00:00:00|2009/02/14T23:00:00| 2880| This breaks down the file information per type: $ rwsiteinfo --fields=type,repo-start-date,repo-end-date,repo-file-count Type| Start-Date| End-Date|File-Count| in|2009/02/12T00:00:00|2009/02/14T23:00:00| 720| out|2009/02/12T00:00:00|2009/02/14T23:00:00| 720| inweb|2009/02/12T00:00:00|2009/02/14T23:00:00| 720| outweb|2009/02/12T00:00:00|2009/02/14T23:00:00| 720| innull| | | 0| outnull| | | 0| int2int| | | 0| ext2ext| | | 0| inicmp| | | 0| outicmp| | | 0| other| | | 0| This shows the information for each sensor: $ rwsiteinfo --fields=type,repo-start-date,repo-end-date,repo-file-count Sensor| Start-Date| End-Date|File-Count| S0|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S1|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S2|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S3|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S4|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S5|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S6|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S7|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S8|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S9|2009/02/12T00:00:00|2009/02/14T23:00:00| 288| S10| | | 0| S11| | | 0| S12| | | 0| S13| | | 0| S14| | | 0| ENVIRONMENT
FILES
NOTESThe repo-start-date, repo-end-date, and repo-file-count fields were added in SiLK 3.11.0.rwsiteinfo was added in SiLK 3.0. rwsiteinfo duplicates the functionality found in mapsid(1). mapsid is deprecated, and it will be removed in the SiLK 4.0 release. Examples of using rwsiteinfo in place of mapsid are provided in the latter's manual page. SEE ALSOsilk.conf(5), mapsid(1), rwfilter(1), rwfglob(1), packlogic-twoway(3), silk(7), tzset(3), environ(7)
Visit the GSP FreeBSD Man Page Interface. |