Health check report


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Health check report
# 8  
Old 02-18-2013
Quote:
Originally Posted by bashi77
Hi Mate, . . .
Code:
print $j |awk '{print $1, "\t", $2 "\t", $3, "\t", $4,"\t", $5,"\t\t "\e[1;34m Good Required space\e[0m"}'

. . .
You've got one double quote too many : "\e, eliminate that one!

EDIT: And, yes, radoulov is right: awk - unlike e.g. shell printf - does not recognize \e, so use \033 instead.

Last edited by RudiC; 02-18-2013 at 07:21 AM.. Reason: addition of \033 info.
# 9  
Old 02-18-2013
Thanks radoulov
\033 did work in awk
# 10  
Old 02-20-2013
Hi All,


Code:
if [ "$opt_out" -eq 0 ]
then
printf "\t\t\tNo opt Disk space"

elif [ "$opt_out" -ge "$a" ]

then
print $j |awk '{print $1, "\t", $2 "\t", $3, "\t", $4,"\t", $5,"\t\t"}'
printf "\033[1;4;33;44m WARNING NEED TO CHECK NOW \033[0m"

else
print $j |awk '{print $1, "\t", $2 "\t", $3, "\t", $4,"\t", $5,"\t\t"}'
printf  "\033[1;31;64m Good Required space \033[0m"

fi

the output as below


server Name: adcsdf0001
13G 7.8G 4.9G 62% /opt
Good Required space 300G 5.8G 294G 2% /stage
Good Required space



is it possible, the messages on same lines with colors

like below

server Name: ssbkup0037
13G 7.8G 4.9G 62% /opt Good Required space
300G 5.8G 294G 2% /stage Good Required space
# 11  
Old 02-20-2013
Understand the difference (mayhap reading man pages?) between print and printf and you should be able to find out yourself.
Colour, however, is working fine!
# 12  
Old 02-20-2013
Hey Rudic,

You are not giving any suggestion , I was upset your comments.

But Now I did myself Because of you
Code:
Your Encouragement is Awesome mate. I am sooooooo Happy now. I doing my self. 

FIRST I SHOULD LEARN THE BASICS, WITHOUT GOOGLE FOR EACH ISSUES.
Thanks lot mate

---------- Post updated at 08:05 PM ---------- Previous update was at 08:05 PM ----------

cheers
# 13  
Old 02-21-2013
I'm glad you got the right mind set. And - as you can see - it is selfrewarding (may not be a proper English word but fits exactly) getting your own script to do what you want it to do.
Of course we could write the scripts for you, now, and the times to come. Would it help? I doubt it. Now you can write all your scripts if need be. And, of course, we are happy to help should specific problems arise in the future.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

AIX Health Check

Hi everyone, I am new to the Unix admin position, needed some help. My management wants to report how their over all AIX servers / environment is doing so far. I've been researching and found multiple commands to run on each LPAR, well I have few questions and also wanted to share the commands Im... (12 Replies)
Discussion started by: Adnans2k
12 Replies

2. Shell Programming and Scripting

Script to check the health of a database

need a script to check the health of a session server database. It must read the data base and send an alert if the database is unavailable. If its unavailable, we will want to bring down the database listener to force failover. can u guyz help me in doing this. what information do i need... (1 Reply)
Discussion started by: remo999
1 Replies

3. HP-UX

HP-UX Health Check

Hi Experts, I want to check health of hp-ux box. Basically I want to check if there are possibilities of network/memory/cpu bottleneck? Are there are any commands available other than glance in hp-ux for the same? (11 Replies)
Discussion started by: sai_2507
11 Replies

4. Shell Programming and Scripting

Health check script

There are 3 servers . I want to fire commands df -kh and mpstat -P ALL on those individual servers and retrieve particular values to genrate reports. This part is almost done. But i am facing issue when i need to compile the reports from all three servers on to one server in order to generate a... (1 Reply)
Discussion started by: pratikm23
1 Replies

5. AIX

AIX Health Check script

Hi Everyone, Can you please help me put together a aix health check script that will check the status of CPU,Memory,Adapter, Filesystems (threshold 80%) and Disks.Im thinking of deploying a script to gather the required data in all the 22 servers and probably send out a mail if anything needs... (3 Replies)
Discussion started by: R!C
3 Replies

6. Shell Programming and Scripting

Health check script

Hi, I have a server type(A group of AIX,HP-UX and Linux servers running with different appn) in which i need to do health check(memory,cpu,h/w etc). I am planning to automate the same. Please help me out in writing the same. Thanks Renjesh Raju (9 Replies)
Discussion started by: Renjesh
9 Replies

7. Solaris

sun server health check

do anybody has a procedure for daily weekley monthly health check for SUN server with solaris OS?? (5 Replies)
Discussion started by: mm00123
5 Replies

8. AIX

AIX Health Check

Hi All, I would like to know if there is a downloadable AIX health check script available from IBM that would print a report of a servers health status. I've been working on a number of Sun Solaris servers and Sun provide a sun checkup script which can give you an ORI figure as well as a list... (3 Replies)
Discussion started by: backslash
3 Replies

9. HP-UX

check health

Dear Gentelmen I need command for display to me the following statement: -battery state -The application if working or not -The cpu is working or not -The power supply is working or not -The Data base is workig or not (2 Replies)
Discussion started by: magasem
2 Replies
Login or Register to Ask a Question