Hello, I wanted to calculate free space in my unix file system. Here is my direction. I can use df -h command to get the below output.
In each file system, in the AVAIL column, i need to minus 10% and find the grand total. That will be the free space in my server..
How do i do this? I thought of moving this whole output to excel file and deduct 10% from Avail column. But i am not able to move the unix output to excel with correct format.
Last edited by Scott; 01-20-2010 at 07:44 PM..
Reason: Added code tags
---------- Post updated at 12:36 PM ---------- Previous update was at 11:42 AM ----------
Your script looks good for linux. I have sun OS server. It is not working correctly for SUN OS machine. The AWK script should behave same way in all unix machine. But somehow not...
Last edited by DukeNuke2; 01-21-2010 at 12:53 PM..
Thanks.. I might need to learn more about AWK programming to get this done. But the beauty is, the same code works in linux and does not work in sunos...
df -h | awk 'NF == 5 {T+=$3} END {print "Total: " T ". 90% of that is " T*.9}'
Hi,
I run Fedora 17.
I created a physical volume of 30GB on a disk with 60GB of space so there is 30GB of free space. On the physical volume, I created my volume group and logical volumes. I assigned all the space in the physical volume to my volume group. I need to add the 30GB of free space... (1 Reply)
hi guys, me again ;)
i recently opened a thread about physical to zone migration.
My zone is mounted over a "bigger" LUN (500GB) and step is now to move the old files, from the physical server, to my zone.
We are talking about 22mio of files.
i used rsync to do that and every time at... (8 Replies)
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
I need to display the amount space avalible on a unix server in an html webpage, which will automatically update every hour. I am able to do so using a javascript in a windows based server. How would i go about doing this in a unix server. Any help, suggestions, anything would be great. thanks. (3 Replies)
Hi all,
Does unix ever misreport free space? We're having a problem running a utility, and the error message looks for all the world like the utility has no free space for its work files:
HOST ERROR(D10681C). No space left on device.
But the device itself shows ample free space.
... (3 Replies)