Jump to content

Perl: Disk Space

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
22 replies to this topic

#1
Guest_Jordan_*

Guest_Jordan_*
  • Guests
This is a perl script written to check the the disk space of a certain partion/directory.

This was written for HP-UX and has not been tested on Linux. Modify for your needs.

###########################
Description:
Detect if the $dir is over $percent full of data and
send an email if so.
Change $email to your email
Change $message to your message (below)

Usage: diskspace.pl [directory] [percent]

Attached Files



#2
RobSoftware

RobSoftware

    Programmer

  • Members
  • PipPipPipPip
  • 143 posts
Thanks, I need something that does this function. Now I won't have to create it myself.

#3
getlies

getlies

    Learning Programmer

  • Members
  • PipPipPip
  • 55 posts
Thanl you very much

I was just looking for something like this

#4
Guest_saltydog4791_*

Guest_saltydog4791_*
  • Guests
thanks so much for this. was looking for something simple like this.

#5
Guest_rigal_*

Guest_rigal_*
  • Guests
does not working in my case :(
Perl 5.006001
Solaris
It says "Can't exec 'bdf': no such file or directory...'
Eats df only.

#6
Guest_chrys_*

Guest_chrys_*
  • Guests
Thank you for sharing your codes. :)

#7
rickyg168

rickyg168

    Newbie

  • Members
  • Pip
  • 3 posts
thanks for this. need it badly

#8
rickyg168

rickyg168

    Newbie

  • Members
  • Pip
  • 3 posts

rigal said:

does not working in my case :(
Perl 5.006001
Solaris
It says "Can't exec 'bdf': no such file or directory...'
Eats df only.

i experience the same problem. anyone who knows how to resolve this?

#9
Guest_Jordan_*

Guest_Jordan_*
  • Guests
You are also using Solaris?

#10
rickyg168

rickyg168

    Newbie

  • Members
  • Pip
  • 3 posts

Jordan said:

You are also using Solaris?

Nope. I would like to use this program in windows XP. how will i do it?

#11
KevinADC

KevinADC

    Programmer

  • Members
  • PipPipPipPip
  • 125 posts

rickyg168 said:

Nope. I would like to use this program in windows XP. how will i do it?

You can't. Unfortunately the script is coded to run only on Unix boxes because it uses the unix bdf command ("disk blocks free" if I am guessing correctly) instead of a pure perl solution that would make it cross platform.

#12
teknojunki

teknojunki

    Newbie

  • Members
  • Pip
  • 1 posts
This is just what I need.