Skip to content

Commit 12c857a

Browse files
committed
Add --csv information to accounting documentation
1 parent 20cbe05 commit 12c857a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

source/administration/users_and_groups/accounting.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ Usage
2424
--xpath expression Xpath expression to filter the results. For example: oneacct --xpath 'HISTORY[ETIME>0]'
2525
-j, --json Output in json format
2626
-x, --xml Output in xml format
27+
--csv Write table in csv format
2728
--split Split the output in a table for each VM
2829
-h, --help Show this message
2930
3031
The time can be written as ``month/day/year hour:minute:second``, or any other similar format, e.g ``month/day hour:minute``.
3132

32-
To integrate this tool with your billing system you can use ``-j`` or ``-x`` flags to get all the information in an easy computer readable format.
33+
To integrate this tool with your billing system you can use ``-j``, ``-x`` or ``--csv`` flags to get all the information in an easy computer readable format.
3334

3435
Accounting Output
3536
=================
@@ -123,6 +124,18 @@ Obtaining the accounting information for a given user
123124
VID HOSTNAME REAS START_TIME END_TIME MEMORY CPU NET_RX NET_TX
124125
3 host01 none 06/04 15:04:47 - 4G 2 0K 0.1K
125126
127+
In case you use CSV output (``--csv``) you will het a header with the neame of each column and then the data. For example:
128+
129+
.. code::
130+
131+
$ oneacct --csv
132+
UID,VID,HOSTNAME,ACTION,REASON,START_TIME,END_TIME,MEMORY,CPU,NET_RX,NET_TX
133+
3,68,esx2,none,none,02/17 11:16:06,-,512M,1,0K,0K
134+
0,0,piscis,none,erro,09/18 15:57:55,09/18 15:57:57,1024M,1,0K,0K
135+
0,0,piscis,shutdown-hard,user,09/18 16:01:55,09/18 16:19:57,1024M,1,0K,0K
136+
0,1,piscis,none,none,09/18 16:20:25,-,1024M,1,2G,388M
137+
0,2,esx1,shutdown-hard,user,09/18 19:27:14,09/19 12:23:45,512M,1,0K,0K
138+
126139
Output Reference
127140
----------------
128141

0 commit comments

Comments
 (0)