To generate the report for a user, run the following command:
$ sudo -u www-data ./occ usage-report:generate admin
"admin","2017-09-18T09:00:01+00:00",5368709120,786432000,12,1,1,2
Leaving out the user argument will generate a report for all users on the system:
$ sudo -u www-data ./occ usage-report:generate --display-name
"admin","Nextcloud Admin","2017-09-18T09:00:01+00:00",5368709120,786432000,12,1,1,2
"test1","Test User 1","2017-09-18T09:00:01+00:00",-2,954368,6,0,2,10
"test2","Second Test user","2017-09-18T09:00:01+00:00",-2,164,4,0,0,0
"test3","Test User Three","2017-09-18T09:00:01+00:00",-2,164,4,0,0,0
"test5","Fifth Tester","2017-09-18T09:00:01+00:00",-2,164,4,0,0,0
The CSV data is the following:
--display-name
is given)--last-login
is given)-3
is unlimited, -2
is unknown/not set)-2
is unknown)To include the header of the fields in the CSV use the --verbose
option:
$ sudo -u www-data ./occ usage-report:generate --verbose admin
"user-id","date as 'c'","assigned quota (5 GB)","used quota (500 MB)",number of files,number of shares,number of uploads,number of downloads
"admin","2017-09-18T09:00:01+00:00",5368709120,786432000,12,1,1,2