Home » RDBMS Server » Server Administration » Looking for some sample script
Looking for some sample script [message #203062] Mon, 13 November 2006 14:46 Go to next message
roopla
Messages: 52
Registered: May 2006
Member
I am looking for some sample unix script to check available/used space on all DB mount points periodically. I would appreciate If anybody has it

Thanks
Re: Looking for some sample script [message #203065 is a reply to message #203062] Mon, 13 November 2006 14:53 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
What kind of unix is this?
All it requires is
oracle@dubbel:~> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              32G   14G   19G  43% /
tmpfs                 507M   12K  507M   1% /dev/

and you can make it any fancy you want.
Re: Looking for some sample script [message #203066 is a reply to message #203065] Mon, 13 November 2006 14:53 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
And search the forum. Too many examples around. Check the faq/scripts section.
Re: Looking for some sample script [message #203080 is a reply to message #203066] Mon, 13 November 2006 16:28 Go to previous messageGo to next message
roopla
Messages: 52
Registered: May 2006
Member
Thanks Mahesh

I am trying to display output of df -h command in a format of fixed length of each field of each record. I am using awk to display each field, but I am not able to align properly if there is any big string appears on filesystem field

Please see the following output: See first 3 records are fine, but last two records are not aligned properly due to large string under filesystem. How can fix it in awk using fixed length column width


Filesystem size used avail capacity Mounted on
/dev1/td/dsk1/d1 19G 3.7G 15G 20% /
/tproc 0K 0K 0K 0% /tproc
/dev/md1/dsk1/d4 14G 2.4G 12G 17% /t1t23u27
/dev1/tvx/tdask/oracle1g/oraclevg 30G 2.6G 27G 10% /ttrso9017/u01

Re: Looking for some sample script [message #203086 is a reply to message #203080] Mon, 13 November 2006 17:19 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
I will look into this.
And Have a look here. More flexible. Just adjust the output formatting as you like.
http://www.quest-pipelines.com/pipelines/dba/tips03.htm#august

[Updated on: Mon, 13 November 2006 17:19]

Report message to a moderator

Re: Looking for some sample script [message #203261 is a reply to message #203086] Tue, 14 November 2006 09:08 Go to previous message
roopla
Messages: 52
Registered: May 2006
Member
Great. Thanks Mahesh. That is the kind of script I am looking for

Thanks again
Previous Topic: 10g RAC implementation
Next Topic: Do Indexes and table data have to be in separate tbsp
Goto Forum:
  


Current Time: Wed Dec 07 02:54:57 CST 2016

Total time taken to generate the page: 0.17033 seconds