BDF test for > 90%

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers BDF test for > 90%
# 1  
Old 08-31-2001
Question BDF test for > 90%

I am trying to write a script that will allow me to do a bdf then do a test for a percentage that is 90% or greater. If the test is true then i want to send a message to myself and one other person.

Any suggestions ? ? ?


# 2  
Old 09-05-2001
Create an aliase in /etc/aliases and add the users you want.

Write a simple script that does a BDF and cuts the percentage field and uses that result in your test case. I suggest PERL, but others might suggest sed or awk. Either way, pipe the result with your own words to a mail program and mail the result (when the test condition is met) to the aliase you created in /etc/aliases.
# 3  
Old 09-05-2001
Thank you for the suggestion. However I do not know Perl, sed, or awk. Is there a way I can do this using Unix commands? I tryed building a script that does a simple BDF and grep for 90%. I figured I would get my logic down first than expand the condition testing. I havn't been to successful so far. I have just recently become aquainted with Unix. My back ground is NT/2000 and HP MPE.

# 4  
Old 09-05-2001
You will need some sort of utility to transform the 'awkward' bdf output into an usable format. Using awk would be easiest, do some reading on the awk command. It is not that hard.
# 5  
Old 09-05-2001
Perl, sed, or awk are all either UNIX command line utilities or can be used in command line mode. So, they are all UNIX commands. What we described is how things are done in the UNIX enviroment. UNIX is not point and click (which translated to slow and buggy), it is crisp and robust.

You must learn UNIX command line utilities to perform UNIX system administration (or hire people who do).
# 6  
Old 09-05-2001
Thank you. I will do some digging into AWK and PERL.
# 7  
Old 09-05-2001
Great. Please post your solution or problems you run into when you try different approaches.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Bdf in HP-UX

Hi guys, I have to make an output of several databases we've got running on our system with the command bdf. This has to be done every 3 months. I want to put it in an scriptfile and trigger it in crontab. In the output it must display the differences in diskspace between these three monts. Any... (3 Replies)
Discussion started by: djmental
3 Replies

2. HP-UX

bdf hangs

hi, bdf command hangs but before it, it lists all the fstab content, so i cannot find the reason... could anybody give me any clue?? thanks a lot for your attention. regards Pablo i attach syslog Jan 14 16:30:00 sv23 vmunix: hp_dlpi_wput:Received an unrecognized primitive: 101d... (7 Replies)
Discussion started by: pabloli150
7 Replies

3. Shell Programming and Scripting

Problem with a BDF script...

Hi, I'm trying to use an old script I found of the internet a while back, I forget where its from. Its supposed to convert the bdf function and display filesystem size in MB's and line it up however it never worked... Here is the error: And here is the code: #!/usr/bin/sh echo... (3 Replies)
Discussion started by: zixzix01
3 Replies

4. Shell Programming and Scripting

Bdf output

Here is my bdf output #bdf Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol3 2097152 217112 1865424 10% / /dev/vg00/lvol1 1835008 329040 1494288 18% /stand /dev/vg00/lvol7 10485760 7864080 2601240 75% /var /dev/vg00/lvol8 8454144 486597 7469647 ... (5 Replies)
Discussion started by: indrajit_renu
5 Replies

5. Shell Programming and Scripting

bdf error

I have this line in a sh script: bdf | grep /var/opt/vgdb | tr -s " " | cut -f4,6 -d" " | awk '{print $2" "$1}' > vgdb_free_space.txt if I run that line in the shell it works fine but when I ran the script got this error: line 83: bdf: command not found also I tried... (4 Replies)
Discussion started by: C|KiLLeR|S
4 Replies

6. Shell Programming and Scripting

How to check weather a string is like test* or test* ot *test* in if condition

How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies

7. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

8. UNIX for Advanced & Expert Users

bdf question

Hi all i am working on script which uses "bdf" output to create excel sheet now when i check "Total" "Used" & "Available" i found that except root everywhere used + available != total here is example : part from bdf output : filesystem-total-used-available-%used-Mounted on ... (4 Replies)
Discussion started by: zedex
4 Replies

9. HP-UX

bdf , /etc/fstab , /etc/mnttab

Hi all, Would like to know if it is possible to rearrange the order that mounts are displayed when the 'bdf' command is issued. An example of what I mean is, currently I see the following ... $ bdf -l Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol3 524288 ... (6 Replies)
Discussion started by: Cameron
6 Replies

10. HP-UX

df and bdf discrepencies

I've recently had some space problems on one of our old HP9000 machines. I archived/moved/compressed/trashed some stuff to free up some space on one rather large (and important) logical volume. As one would expect, when `df -b` is executed some space is shown as free: /opt ... (2 Replies)
Discussion started by: sam_pointer
2 Replies
Login or Register to Ask a Question