Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: doughnut charts with gd:graph

by Tux (Canon)
on Jul 26, 2018 at 11:31 UTC ( [id://1219308]=note: print w/replies, xml ) Need Help??


in reply to Re^3: doughnut charts with gd:graph
in thread doughnut charts with gd:graph

Or install (locally) the superior tool di, which supports CSV output

$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 1918133328 118161992 1798006108 7% / devtmpfs 8208688 40 8208648 1% /dev tmpfs 8222552 972 8221580 1% /dev/shm tmpfs 8222552 830192 7392360 11% /run tmpfs 8222552 0 8222552 0% /sys/fs/cgroup tmpfs 8222552 830192 7392360 11% /var/run tmpfs 8222552 830192 7392360 11% /var/lock /dev/sdb1 1952559608 52871420 1899688188 3% /pro $ di Filesystem Mount Size Used Avail %Used f +s Type /dev/sda1 / 1.8T 0.1T 1.7T 6% e +xt4 tmpfs /dev/shm 7.8G 0.0G 7.8G 0% t +mpfs /dev/sdb1 /pro 1.8T 0.0T 1.8T 3% x +fs tmpfs /run 7.8G 0.8G 7.0G 10% t +mpfs tmpfs /sys/fs/cgroup 7.8G 0.0G 7.8G 0% t +mpfs tmpfs /var/lock 7.8G 0.8G 7.0G 10% t +mpfs tmpfs /var/run 7.8G 0.8G 7.0G 10% t +mpfs $ di -c s,m,b,u,v,p,T "/dev/sda1","/","1.8T","0.1T","1.7T",6%,"ext4" "tmpfs","/dev/shm","7.8G","0.0G","7.8G",0%,"tmpfs" "/dev/sdb1","/pro","1.8T","0.0T","1.8T",3%,"xfs" "tmpfs","/run","7.8G","0.8G","7.0G",10%,"tmpfs" "tmpfs","/sys/fs/cgroup","7.8G","0.0G","7.8G",0%,"tmpfs" "tmpfs","/var/lock","7.8G","0.8G","7.0G",10%,"tmpfs" "tmpfs","/var/run","7.8G","0.8G","7.0G",10%,"tmpfs" $ di -c | perl -MDP -MText::CSV_XS=csv -wE'DDumper(csv(in=>*STDIN,key= +>"m")->{"/"})' { T => 'ext4', b => '1.8T', m => '/', p => '6%', s => '/dev/sda1', u => '0.1T', v => '1.7T' }

Alternatively, you could use a CPAN module like Filesys::DiskSpace (no updates since 1999) or Filesys::DfPortable (no updates since 2006).


Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1219308]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-24 14:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found