The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help regarding saving information within a script! phproxy UNIX for Dummies Questions & Answers 8 07-15-2008 01:44 PM
put an interactive script in background after taking input epsilonaurigae Shell Programming and Scripting 7 02-15-2008 10:18 PM
Script information needed chris1234 UNIX for Dummies Questions & Answers 3 12-17-2007 07:35 PM
Shell script is taking more than 3 hrs to execute nvuradi Shell Programming and Scripting 2 11-18-2007 11:02 PM
Script execution information manthasirisha Shell Programming and Scripting 12 07-07-2006 09:54 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-12-2008
arunkumar_mca arunkumar_mca is offline
Registered User
  
 

Join Date: Oct 2004
Posts: 256
script fot taking mount information

Hi all,

I want to take the details of all mounted directories.Some thing like using bdf we can get the information.

My code should get the information about the mounted directories and should write into a file.

What we are going to do is we are going to shutdown our HP unix server and then we are going to increase it speed. So when shut down we need to take information of all mounted directories and then after the we increase the speed we need to run that script again and need to compare whether all directories are mounted .

We need to write a script ,can some body help me out, i am not in idea where to start..

thank you all
  #2 (permalink)  
Old 10-12-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922

Code:
mount | sort > /var/tmp/outputfile

The 'sort' is there to make sure you don't get a false alert if mount returns the same mounts but in a different order.
  #3 (permalink)  
Old 10-12-2008
arunkumar_mca arunkumar_mca is offline
Registered User
  
 

Join Date: Oct 2004
Posts: 256
Thank you.. but i need to get the CPU usage information also with this ... Any way ??..

Thanks in advance
  #4 (permalink)  
Old 10-13-2008
arunkumar_mca arunkumar_mca is offline
Registered User
  
 

Join Date: Oct 2004
Posts: 256
mount command is not working in my HP unix . Is there any other command

(sys19nlfct:/pfact>) mount | sort
ksh: mount: not found
(sys19nlfct:/pfact>)


Thanks,
  #5 (permalink)  
Old 10-13-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,586
>mount command is not working in my HP unix . Is there any other command

That is not what the output says:
ksh: mount: not found

It means its not in your PATH variable...
type

Code:
ant:/home/vbe $ whereis mount
mount: /usr/sbin/mount /sbin/mount /usr/share/man/man1m.Z/mount.1m /usr/share/man/man2.Z/mount.2 /usr/share/man/man3.Z/mount.3n

So if you type

Code:
 /usr/sbin/mount

You will see it works...
  #6 (permalink)  
Old 10-13-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,586
Now there is a file called /etc/mnttab which contains all the information on mounted FS

If its comparing after a reboot, then just make a copy like

Code:
cp -p /etc/mnttab /etc/mnttab.sav

then compare both files after reboot
If you see differences such as missing FS, you should wonder if your /etc/fstab is up to date...

Now Im interested in what you call "increase its speed"...
Are you changing CPU?
Adding memory?
Or trying to fine tune...
  #7 (permalink)  
Old 10-13-2008
arunkumar_mca arunkumar_mca is offline
Registered User
  
 

Join Date: Oct 2004
Posts: 256
Thanks for you reply
we are adding memmory


Filesystem kbytes used avail %used Mounted on
/dev/vg00/root 204800 181517 21858 89% /
/dev/vg00/stand 163477 51262 95867 35% /stand
/dev/vg00/var 2224128 1972095 236424 89% /var
/dev/vg01/lv108 4194304 3041 3930213 0% /var/adm/crash
/dev/vg01/lv107 720896 592210 120813 83% /var/abinwork
/dev/vg00/usr 4194304 3703330 460642 89% /usr
/dev/vg00/openv 307200 171540 127286 57% /usr/openv
/dev/vg01/lv105 1048576 422676 587469 42% /usr/local.local/autotree

i got this from bdf.

what we need is to run a script which takes the available,used and %used from all the monuted directories before shut down and check whether it is same after shut down

Thanks in advance
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0