Sponsored Content
Top Forums Shell Programming and Scripting Filesystem alert shell script not working!! Post 302419669 by curleb on Friday 7th of May 2010 05:20:49 PM
Old 05-07-2010
Hmmm...works for me on Solaris10, ksh.

...with local filesystems too, of course...
 

10 More Discussions You Might Find Interesting

1. AIX

Creating a shell script to check filesystem space

I need to create a simple shell script to check filesystems space in a file system called "/arch_nb" then based on the percentage use either run another script or exit. I was thinking of something simple along the lines of: df -k | then some action to pipe for percentage used ...place... (10 Replies)
Discussion started by: heprox
10 Replies

2. Shell Programming and Scripting

shell script to mount filesystem

Hi, Gurus: I need your help to finish a script that will mount two file systems automatically when saver is reboot or start. I am working on a new Sun Sparc machine with Solaris 9 on it. This box got two disk. disk one has been partitioned to hold Solaris OS. disk two has been partitioned as... (6 Replies)
Discussion started by: duke0001
6 Replies

3. Shell Programming and Scripting

simple script to alert if internet not working?

Hi, I am constantly automaticaly downloading a few things on the internet but since my internet connection is unstable, it sometimes wont work. Thing is the internet will appear to be connected, but no website can be accessed and no program can successfully connect to any location. I can fix... (4 Replies)
Discussion started by: fuzzylogic25
4 Replies

4. Shell Programming and Scripting

Unix Shell Script to automate email alert

Hi all, I have a task on my plate which is of high priority. I need an automated email alert that checks FTP notices subdirectory on a daily basis and forwards any word files to a group of people. This word files gets created whenever there is an issue with FTP connectivity. Please help...... (1 Reply)
Discussion started by: stunnerz_84
1 Replies

5. Shell Programming and Scripting

Shell script to find filesystem capacity on 50 servers

Hi all, I am new to Unix and I want to write a shell script in a jumpbox for finding the filesystem capacity on 50 unix servers ( by ssh ) and then email the result in HTML format with server name and capacity % to a specific outlook distribution list. any suggestion would be of great help. (17 Replies)
Discussion started by: amitbisht9
17 Replies

6. Shell Programming and Scripting

shell script to alert if a file has been modified

Hi , I want a script who will send alert the moment someone edit any file in a directory in LINUX. Can some one throw some light on this please.!! (4 Replies)
Discussion started by: d8011
4 Replies

7. Shell Programming and Scripting

Shell script for alert

Hi Experts, Im new in shell script , please help to achieve the below requirement, We have some replication setup in unix server, in that if there is any exception or error occurs immediately the rep_exception.log will have the exception detail, this log will be updated if any error occurs no... (8 Replies)
Discussion started by: pandiyan
8 Replies

8. Shell Programming and Scripting

Shell script to send mail alert

HI Guys, I am writing one shell script to send the mail alert to some email id's if the file not modified in last 10 mins but its not working, I believe MTIME is null string is wrong . can you please assist me on this. script :- filename="abc.txt" echo "Filename is $filename"... (1 Reply)
Discussion started by: abhigrkist
1 Replies

9. UNIX for Beginners Questions & Answers

Shell script to send mail alert

Hi I have below shell script to send mail alert , however I want to add more functionality in this script and that is , script should only check that file between 9 am to 5pm , and if there is no activity in this time 9 am to 5 pm for 2hours then it should give me mail alert, please help... (2 Replies)
Discussion started by: scazed
2 Replies

10. Shell Programming and Scripting

Filesystem alert shell script not working!!

Hi All, My below shell script is not capturing %used value in the filesystem alert in the subject of the mail alert: Code: #!/bin/bash export DBALIST="abc@xyz.com" df -k /oradata/xyz/archive > dfk.result archive_capacity=`awk -F" " '{ print $5 }' dfk.result|grep -i %| cut -c 1-4` if... (6 Replies)
Discussion started by: harveyclayton
6 Replies
bootadm(1M)															       bootadm(1M)

NAME
bootadm - manage bootability of GRUB-enabled operating system SYNOPSIS
/sbin/bootadm update-archive [-vn] [-R altroot] /sbin/bootadm list-archive [-vn] [-R altroot] only /sbin/bootadm set-menu [-R altroot] key=value /sbin/bootadm list-menu [-R altroot] The bootadm command manages the boot archive and GRUB (GRand Unified Bootloader) menu. The update-archive option provides a way for user to update the boot archive as a preventative measure or as part of the recovery procedure. The set-menu subcommand allows you to switch the auto-boot timeout and default boot entry in the GRUB menu. The list-menu subcommand displays the location of the GRUB menu and the current GRUB menu entries. While the typical location of the GRUB menu is /boot/grub/menu.lst, depending on the install method used the active GRUB menu might be located somewhere else. Use the list-menu subcommand to locate the active GRUB menu. For example, if a system was installed using Live Upgrade, the GRUB menu might not be located in the current boot environment. See the section for typical output from the list-menu option. Note that a SPARC system does not have the concept of a boot archive. The bootadm command on a SPARC system is intended for managing disk- less clients. SUBCOMMANDS
The bootadm command has the following subcommands: update-archive Updates current boot archive if required. Applies to both SPARC and platforms. list-archive Lists the files and directories to be included in the boot archive. Applies to both SPARC and platforms. set-menu Maintain the GRUB menu. The current GRUB menu is boot/grub/menu.lst, relative to root. Do not depend on this location, because it is subject to change. Applies to platforms only. list-menu Lists the location of the active GRUB menu, as well as the current GRUB menu entries. This includes the autoboot-timeout, the default entry number, and the title of each entry. Applies to platforms only. The bootadm command has the following options: -v In an update-archive operation, stale files are displayed on stderr. -n In an update-archive operation, archive content is checked but not updated. -R altroot Operation is applied to an alternate root path. Note - The root file system of any non-global zones must not be referenced with the -R option. Doing so might damage the global zone's file system, might compromise the security of the global zone, and might damage the non-global zone's file system. See zones(5). key=value Possible values are: default=entrynum The item number (for example, 0, 1, or 2) in the GRUB menu designating the operating system to boot when the timer expires. timeout=seconds The number of seconds before the operating system designated by the default item number is booted. If the value is -1, auto boot is disabled. Example 1: Updating the Current Boot Archive The following command updates the current boot archive: # bootadm update-archive Example 2: Updating the Boot Archive on an Alternate Root The following command updates the boot archive on an alternate root: # bootadm update-archive -R /a Example 3: Listing Installed OS Instances The following command lists the installed operating system instances in a GRUB menu: # bootadm list-menu default=0 timeout=10(0) Solaris10(1) Solaris10 Failsafe(2) Linux Example 4: Switching Default Boot Entry The following command refers to the menu displayed in the previous example. The user selects Linux (item 2). # bootadm set-menu default=2 Example 5: Listing GRUB Menu Entries and Location of GRUB Menu The following command lists the GRUB menu entries and the location of the GRUB menu: # bootadm list-menu The location for the active GRUB menu is: /stubboot/boot/grub/menu.lst default 0 timeout 10 0 Solaris10 1 Solaris10 failsafe 2 Linux Example 6: Displaying Location of GRUB Menu The following command displays the location of the GRUB menu: # bootadm list-menu The location for the active GRUB menu is: /dev/dsk/c0t1d0s0 (not mounted) The filesystem type of the menu device is <ufs> default 2 timeout 10 0 c0t1d0s3 1 c0t1d0s3 failsafe 2 Solaris10 3 Solaris10 failsafe In this example, the active GRUB menu is located on a device which is not mounted. To access the GRUB menu, mount the device and access the GRUB menu at <mountpoint>/boot/grub/menu.lst. The following exit values are returned: 0 The command completed successfully. 1 The command exited due to an error. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ boot(1M), installgrub(1M), attributes(5) The GRUB home page: http://www.gnu.org/software/grub/ 10 Oct 2005 bootadm(1M)
All times are GMT -4. The time now is 09:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy