Posts Tagged ‘filesystems’

ITM6 : Take Action : Remount Stale remote filesystems

July 8th, 2009

 

Situation

An ITM6 Unix (UX) or Linux (LZ) agent detects that its remote filesystems are unavailable, a “stale” connection.

Automate an action to remount it if possible

Methodology

Two (2) ITM situations are created where

  1. detects the mount point has become stale
  2. the other is triggered by the “correlated situation” condition of #1 being tr

Situation #1 : Detect “Stale” remote FS

Simple enough – if “Space Available” fails collection, there is an issue


 

Situation #2 : Remount Situation

Formula Conditions

Use the “Situation Comparison” for a condition against the situation above

Take Action

Note: the lines are strung together on one line in the Take Action field, to make it more legible here, newlines are after the semicolons

f=”&{Linux_Disk.Mount_Point}” ;
u=`umount -f $f 2>&1 && echo $f`;
m=`mount $f 2>&1 && echo $f`;
echo -e “umount: $u\nmount:$m” | mail -s “ITM ACTION: Remount $f” junkmail@JdsMedia.net

 

  • Share/Bookmark

Tags: , , , , , , , , , , , ,
Posted in ITM6.x | Comments (0)

Linux Filesystem Usage “Trick”

July 9th, 2008

Command: du (mneumonic: disk usage)

How can one get the disk usage of a directory, but didn’t want the directories which are mountpoints of other filesystems…

The disk usage calculation can be limited to the actual mounted partition with the -x flag.

tivoli@tivdzl01:~> df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/dg_system/lv_root 20564 11362 8158 59% /
/dev/dasda1 86 10 72 12% /boot
grasshopper:/iso/tivoli 70556 52084 16322 77% /tmp/tivoli


## Notice the size differences below
tivoli@tivdzl01:~> du -smx /
11325   /

tivoli@tivdzl01:~> du -sm /
63478   /

[ NOTE : The size differences are due to df getting the filesystem info based on 512byte blocks ]

  • Share/Bookmark

Tags: , , , , , , , , , , ,
Posted in Non-Tivoli | Comments (0)

  • LinkedIn

    If you want to see my LinkedIn profile, click on this button:

    Jim Sander
  • Save MySQL

JDS Media is Digg proof thanks to caching by WP Super Cache