script fot taking mount information


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users script fot taking mount information
# 1  
Old 10-12-2008
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  
Old 10-12-2008
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  
Old 10-12-2008
Thank you.. but i need to get the CPU usage information also with this ... Any way ??..

Thanks in advance
# 4  
Old 10-13-2008
mount command is not working in my HP unix . Is there any other command

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


Thanks,
# 5  
Old 10-13-2008
>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  
Old 10-13-2008
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  
Old 10-13-2008
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem in taking input Shell script

I was writing a shell script, where i need to run a command through script and then take input from user and later terminate it. i am not sure how to take input in a proper format immediately after a command. example: below command line is used to import some data in to database (LDAP)... (3 Replies)
Discussion started by: Mridul17
3 Replies

2. Shell Programming and Scripting

Use same file selected in first bash process that has matching digits in it fot the second

In the below portion of a bash script the user selects a file from a directory. select file in $(cd /home/cmccabe/Desktop/NGS/API/5-14-2016/bedtools;ls);do break;done files in directory 123_base_counts.txt 456_base_counts.txt 789_base_counts.txt second portion of bash currently (user... (4 Replies)
Discussion started by: cmccabe
4 Replies

3. Shell Programming and Scripting

Taking information from a postgres sql query and putting it into a shell script array

I have a postgres sql statement that is the following: select age from students; which gives me the entries: Age --- 10 15 13 12 9 14 10 which is about 7 rows of data. Now what I would like to do with this is use a shell script to create an array age. As a results... (3 Replies)
Discussion started by: JSNY
3 Replies

4. Shell Programming and Scripting

Script to mount nas-share using generated credentials (mount EC 13,32)

Heyas At home i have 1 nas with 3 shares, of which i used to mount 2 of them using a script with hardcoded password and username in it. EDIT: Turns out, its not the script, but 'how i access' the nas share.. (-o user=XY,password=... VS. -o credentials=...). Figured about credential files,... (0 Replies)
Discussion started by: sea
0 Replies

5. Shell Programming and Scripting

Script taking more time in CRONTAB

Hello All, I have created a shell script, When i run it manually as ./<script_name> it takes 5 hours to run, but when i am scheduling it in crontab, it is taking 20 hours to run. Please help me and advice, what can be done to reduce the time in crontab. Thank you (6 Replies)
Discussion started by: anand2308
6 Replies

6. Shell Programming and Scripting

Perl script for taking inputs from one script and storing them into a document.

Hi. I wanted to create a Perl script which can take the outputs of a Perl script as it's input and temporarily store them in a document. Need help. Thanks.:) (8 Replies)
Discussion started by: xtatic
8 Replies

7. AIX

Where do I get bos.adt.debug fot AIX 6.1 ?

Hello, Can't find this package anywhere: Searched all AIX 6.1 CD's - nothing Serched expansion pack - nothing Where do I get it ? thanks Vilius ---------- Post updated at 01:39 PM ---------- Previous update was at 10:58 AM ---------- Ok this was my mistake. bos.adt.debug was... (1 Reply)
Discussion started by: vilius
1 Replies

8. Solaris

Information about taking dump of a unix server on a tape and then restoring

Hi all, Can anyone provide me with a site or book that gives detailed information about taking dump of a unix server on a tape and then restoring the server from the dump Also i want information about migration from old server to new server (solaris 5.6 to solaris 8) (3 Replies)
Discussion started by: asalman.qazi
3 Replies

9. Shell Programming and Scripting

script for taking the stats from a file

i have file which contains data like this every day.i need to pull up a report for counting the 203's in that file for each subscriber id.there are around 200 subscriber id's. all ths Y's which i have written in the script are the subscriber id's.could some one give me an idea as to how do it in... (22 Replies)
Discussion started by: archana234
22 Replies

10. Shell Programming and Scripting

Shell script is taking more than 3 hrs to execute

Hi I am doing a process of converting all the values of key column into a row, for eg Key col1 col2 1 1 1 1 2 1 1 1 3 1 3 1 2 ... (2 Replies)
Discussion started by: nvuradi
2 Replies
Login or Register to Ask a Question