Sponsored Content
Full Discussion: AIX Health Check script
Operating Systems AIX AIX Health Check script Post 302482837 by DGPickett on Wednesday 22nd of December 2010 04:52:23 PM
Old 12-22-2010
Don't forget inodes on simple UFS file systems. Memory does not run out, but swap does. This is really a lot of questions, unless someone wants to share one they wrote. You might get more response one at a time. Lets see, 'df' can tell about % available with the right options, and inodes available, too, and also checks NFS and local mounts. CPU checks for offline are very proprietary and model variant. Checking CPU Idle is easier, with 'vmstat' or the like.
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

need help to write script to check the process health and automatically restart it

I am working on a project, which need to constantly watch the process, and check its status, if it was dead, it should be restart automatically. Please kindly refer me to URL which teach how to write this kind of script, or service. Thanks. (1 Reply)
Discussion started by: dragondad
1 Replies

3. 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

4. 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

5. 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

6. 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

7. Shell Programming and Scripting

Daily health check script

Hi I am still learning how to write shell scripts, so I started to write a script like this: #!/bin/sh date echo outputOK () { echo $1 "" } outputOK () { echo $1 "" } for vol in `/usr/bin/grep -E 'hfs|vxfs|nfs|cifs' /etc/fstab | egrep -v '^#' | awk '{ print $3 }'` do if... (7 Replies)
Discussion started by: fretagi
7 Replies

8. 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

9. Shell Programming and Scripting

Health check report

Hi Team, I am writing a small script in that I want collect all servers of /opt and /stage. Below is my small script #!/bin/ksh #checking Media server opt_Disk_Space_logs myclient=`cat media_server.txt` > opt_logs.txt printf " Server Name\tsize\tused\tavail\tcapacity\tMounted... (12 Replies)
Discussion started by: bashi77
12 Replies

10. 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
fsck(8) 						      System Manager's Manual							   fsck(8)

Name
       fsck - check and repair file system

Syntax
       /etc/fsck [ -p -P ] [ filesystem ...  ]
       /etc/fsck [ -b block ] [ -y ] [ -n ] [ filesystem ] ...

Description
       The  command checks and corrects either a standard set of file systems or the specified file systems for consistency.  This command is nor-
       mally used in the script during automatic reboot.  In this case, reads the file to determine which UFS file systems to check.  It uses  the
       information to inspect groups of disks in parallel, taking advantage of I/O overlap to check the file systems as quickly as possible.

       The  command makes a number of passes to check the file systems for consistency.  Usually, the root file system is checked on pass 1, other
       root file systems such as partition are checked on pass 2, and other small file systems are checked on separate passes.	For  example,  the
       file  systems  are  usually  checked on pass 3 and the file systems are usually checked on pass 4.  The large user file systems are usually
       checked on the final pass.  A pass number of 0 in causes a disk to not be checked.  Similarly, partitions that are not shown to be  mounted
       with or are not checked.

       The  option  should  be	used  to check file systems.  The generic file system interface, causes to realize when a file system is unmounted
       cleanly and thus prevents from doing the check.	File systems are unmounted cleanly only when an error-free shutdown has been performed	or
       the  file  system  was  unmounted.  However, a timeout factor is used by to determine if should be run regardless of the value of the clean
       byte.  The timeout factor is initially set to 20 and is decremented when any one of three events occur:

	      -  A file system is mounted,

	      -  10,000 updates have occurred

	      -  A file system was updated and occurred more than 60 days prior

       When the timeout factor reaches 0, will automatically check it.	This factor can be changed with If the option is used, the  parallel  con-
       sistency checks are performed like the option regardless of how the file system was unmounted.

       If  an  attempt	is made to check a mounted file system using the block device, will report filesystem: and will check the filesystem as if
       the option is selected.

       The system ensures that only a restricted class of file system inconsistencies can occur unless hardware or  software  failures	intervene.
       The inconsistencies are limited to:

	      Unreferenced inodes

	      Link counts in inodes are too large

	      Missing blocks in the free list

	      Blocks in the free list are also in files

	      Counts in the superblock are wrong

       These are the only inconsistencies that corrects with either the or option.  If encounters other inconsistencies, it exits with an abnormal
       return status and an automatic reboot will then fail.  For each corrected inconsistency one or more lines are printed identifying the  file
       system  on which the correction will take place and the nature of the correction.  If any inconsistencies occur, the message is printed and
       runs again to verify that the appropriate changes were made.  After correcting a file system, prints the number of files on that file  sys-
       tem  and  the  number  of used and free blocks and also the percent of fragments vs blocks.  When the fragmentation exceeds 5% it is recom-
       mended that the file system be dumped to tape, and restored.  Also, a clean byte is set for the checked file system.  The root file  system
       is checked regardless of whether the clean byte is set.

       Without the or options, audits and interactively repairs inconsistent conditions for file systems.  If the file system is inconsistent, the
       operator is prompted before each correction is attempted.  It should be noted that a number of the corrective actions which are not fixable
       using  the or options will result in some loss of data.	The amount and severity of data lost may be determined from the diagnostic output.
       The default action for each consistency correction is to wait for the operator to respond or If the operator does not  have  write  permis-
       sion, defaults to a action.

       If no file systems are given to then a default list of file systems is read from the file The command only checks file systems of type UFS.

       The command checks for the following inconsistencies:

	      Blocks claimed by more than one inode or the free list.

	      Blocks claimed by an inode or the free list outside the range of the file system.

	      Incorrect link counts.

	      Size checks; directory size not of proper format.

	      Bad inode format.

	      Blocks not accounted for.

	      Directory checks; file pointing to unallocated inode; inode number out of range.

	      Superblock checks; more blocks for inodes than there are in the file system.

	      Bad free block list format.

	      Total free block or free inode count incorrect.

       If  detects allocated but unreferenced files and directories, it prompts you before placing them in the directory.  The only restriction is
       that the directory must exist in the root of the file system being checked and must have empty slots before  is	run.   If  necessary,  the
       directory can be enlarged by creating many files in the directory and then removing them.

       General	users  can  run on file systems with certain restrictions.  The user must have execute permissions on the device and general users
       cannot run on a mounted file system.

Options
       -b     Use the block specified immediately after the flag as the superblock  for  the  file  system.   Block  32  is  always  an  alternate
	      superblock.

       -y     Assume  a response to all questions asked by this should be used with caution as this allows to continue after essentially unlimited
	      trouble has been encountered.

       -n     Assume a response to all questions asked by do not open the file system for writing.

       -p     Check a file system that was not unmounted cleanly.

       -P     Check a file system regardless of how it was unmounted.

Restrictions
       Inode numbers for and in each directory should be checked for validity.	The command will not allow checking a  raw  device  if	the  block
       device is mounted.

Files
       Contains default list of file systems to check

See Also
       getmnt(2), fstab(5), ufs(5), crash(8v), mkfs(8), mklost+found(8), mount(8), mount(8ufs), newfs(8), reboot(8), tunefs(8)

																	   fsck(8)
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy