Sponsored Content
Top Forums Shell Programming and Scripting Notify as soon as an error is encountered in a script Post 302984360 by hicksd8 on Tuesday 25th of October 2016 05:30:48 AM
Old 10-25-2016
So can't you test the exit status of the command to see if it's non-zero and, if so, email the log to yourself there and then?

I'm assuming that the RAID command obeys usual practice and gives a non-zero exit status if it errors.
This User Gave Thanks to hicksd8 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX Benchmarks

Encountered error!

I used this on an AIX machine and encountered the following error. $ ls -l total 600 -rwxrwxrwx 1 e26936 dba 1491 Feb 07 1992 MANIFEST -rwxrwxrwx 1 e26936 dba 8148 Apr 05 1992 Makefile -rwxrwxrwx 1 e26936 dba 4852 Sep 06 2003 README -rwxrwxrwx... (0 Replies)
Discussion started by: puspendu
0 Replies

2. Shell Programming and Scripting

How the first script should notify in case there is no response from second

Hi Experts, I am trying to write a ksh script that it should notify in case there is no response from the other script. I mean to say that I got a.sh and b.sh the execution of b.sh depends on a.sh, so if there is no response from a.sh, b.sh should notify me about the same. Thanks in Advance (4 Replies)
Discussion started by: rajusa10
4 Replies

3. Shell Programming and Scripting

Using mail command to notify the status of script

Can someone please help me with this script, I'm trying to create system backup on AIX, for this I want to first mount the filesystem if it is not mounted, then create the backup and unmount the filesystem but I'm having problem while using the mail command to notify the status of filesystem... (9 Replies)
Discussion started by: mbak
9 Replies

4. Shell Programming and Scripting

How to write a shell script to notify when certain texts appear in a file?

I have a server and occasionally the file mysqld.log would show something like /usr/libexec/mysqld: Disk is full writing './example_com_-_wordpress/wp_statpress.MYD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs How do I write a simple shell script to check mysqld.log... (1 Reply)
Discussion started by: acider
1 Replies

5. Shell Programming and Scripting

notify-send does not notify real time

Hi, I am having a little trouble getting notify-send to work the way I would like it to. I am using ubuntu - karmic koala 2.6.31-19-generic #56-Ubuntu SMP So here's the problem run the following commands one after the other. notify-send -i info -t 100000 -- "Hi" "world" & notify-send -i... (3 Replies)
Discussion started by: linuxpenguin
3 Replies

6. AIX

Error encountered in creating a filesystem

Hi experts, Need help on the below error please. I am creating Filesystem and it fails with the below errors :( Command: failed stdout: yes stderr: no Before command completion, additional instructions may appear below. 0518-506 odmget: Cannot open object class PdAt ... (10 Replies)
Discussion started by: EngnrRG
10 Replies

7. Shell Programming and Scripting

Bash script to notify when ever any files are changed

Hi the following script let sthe user know whenevr any file is changed inserted or deleted in file system. but i am getting following error while running bash script ## LINUX SYSTEM FILE ARCHIVE NOTIFY ## if ; then echo "Usage '$0 folder waitseconds' " ; exit 1; fi if ; then echo "Folder... (1 Reply)
Discussion started by: programmingzeal
1 Replies

8. Shell Programming and Scripting

awk - continue when encountered division error

Hello, How can I add a logic to awk to tell it to print 0 when encountering a division by zero attempted? Below is the code. Everything in the code works fine except the piece that I want to calculate read/write IO size. I take the kbr / rs and kbw / ws. There are times when the iostat data... (5 Replies)
Discussion started by: tommyd
5 Replies

9. Shell Programming and Scripting

Shell script to notify of service down

Hi All I am trying to write a shell script that will notify via email if a particular service is down. What I have so far is a script in cron like his: #!/bin/sh cd /usr/jdk/instances/jdk1.6.0/bin/sparcv9 jps -m And the output of the above is 81529 Jps 52988 TaskControllerService... (5 Replies)
Discussion started by: fretagi
5 Replies

10. UNIX for Advanced & Expert Users

Problem with shell script while spaces encountered in directory names

Hi, I am having issues with the jar -tf command when I put in the shell script. The command runs fine from the command line as shown below. # jar -tf "./VirtualBox Dropped Files/2016-04-17T20:58:49.129139000Z/hive-exec-0.8.1.jar" But when I put in a shell script(shown below) and the... (10 Replies)
Discussion started by: vinoo128
10 Replies
raidctl(1M)						  System Administration Commands					       raidctl(1M)

NAME
raidctl - RAID hardware utility SYNOPSIS
raidctl -c disk1 disk2 raidctl -d disk1 raidctl [-f] -F filename controller... raidctl -l [controller...] DESCRIPTION
The raidctl utility creates, deletes, or displays RAID volumes of the LSI1030 HW Raid controllers that include RAID support. The utility also updates firmware/fcode/BIOS for both RAID and non-RAID controllers. The raidctl utility requires privileges that are controlled by the underlying file-system permissions. Only privileged users can manipulate the RAID system configuration. If a non-privileged user attempts to create or delete a RAID volume, the command fails with EPERM. Without options, raidctl displays the current RAID configuration on all exisiting controllers. OPTIONS
The following options are supported: -c disk1 disk2 (for on board) Create a mirror using disk1 and disk2. Replace the contents of disk2 with the contents of disk1. Specify disk1 and disk2 in canonical form, for example, c0t0d0. When you create a a RAID volume, the RAID volume assumes the identity of the first target in the disk pair (disk1). The second target (disk2) disappears from the system. Therefore, the RAID volume appears as one disk. To have a successful RAID creation, there must not already be a RAID configuration present on the specified controller. Additionally, the secondary disk must not be mounted, as it has all its data erased and replaced with the primary disk's data. -d disk1 (for on board) Delete the RAID volume specified as disk1. Specify disk1 in canonical form, for example, c0t0d0. -f (for HBA) Force an update. Do not prompt. -F filename controller (for HBA) Update the firmware running on the specified controller (controller). -l [controller ...] (for on board) List the system's RAID configuration. If controller is specified, list RAID configurations for controller. Output from the -l lists the following information: RAID Volume Displays logical RAID volume name. RAID Status Displays RAID status as either RESYNCING (disks are syncing), DEGRADED RAID is operating with reduced functionality), OK (operating optimally), or FAILED (non-functional). RAID Disk Displays RAID disk name. Disk Status Displays disk status as either OK or FAILED. EXAMPLES
Example 1: Creating the RAID Configuration The following command creates the RAID configuration: # raidctl -c c0t0d0 c0t1d0 RAID Volume 'c0t0d0' created Example 2: Displaying the RAID Configuration The following command displays the RAID configuration: # raidctl RAID RAID RAID Disk Volume Status Disk Status ---------------------------------------- c0t0d0 RESYNCING c0t0d0 OK c0t1d0 OK Example 3: Deleting the RAID Configuration The following command deletes the RAID configuration: # raidctl -d c0t0d0 RAID Volume 'c0t0d0' deleted Example 4: Updating Flash Images on the Controller The following command updates flash images on the controller: # raidctl -F lsi1030.fw 0 Update flash image on controller 0? (y/N): y Flash updated successfully EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 Invalid command line input. 2 Request operation failed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) System Administration Guide: Basic Administration SunOS 5.10 17 Aug 2004 raidctl(1M)
All times are GMT -4. The time now is 08:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy