Need a Script

Taking care of your Linux box.
telenor
Havaldaar
Posts: 104
Joined: Tue Mar 29, 2005 11:08 am

Need a Script

Postby telenor » Tue Mar 31, 2009 3:56 pm

Hi,

I need a script that calculate the size of following logs Plus Disk Usage size of "/" then mails all the calculating sizes to "xvz@abcdomain.com".


LOG FILES ARE:

* /var/log/cacti/cacti.log
* /var/log/maillog

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re: Need a Script

Postby LinuxFreaK » Tue Apr 07, 2009 11:16 am

Farrukh Ahmed

x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Postby x2oxen » Tue Apr 07, 2009 11:36 am

Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Postby LinuxFreaK » Thu Apr 09, 2009 3:39 pm

Farrukh Ahmed

x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Postby x2oxen » Tue Apr 14, 2009 4:07 pm

it will tell him that how much disk space is available on his mounted partitions. It there anything wrong with it??
Muhammad Usman

+92-321-6640501

Chemonics International

http://usmanpk.com

lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Postby lambda » Tue Apr 14, 2009 5:28 pm

yes, it's not what the poster wanted. the poster wants just the disk usage for /, probably can't use the other info (or parse out what he needs from it).

also, "-h" is for humans, not for scripts. use "-k".
Watch out for the !
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?

x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Postby x2oxen » Wed Apr 15, 2009 1:32 pm

Muhammad Usman

+92-321-6640501

Chemonics International

http://usmanpk.com


Return to “Administration”

Who is online

Users browsing this forum: No registered users and 1 guest