Sponsored Content
Full Discussion: memory full warning message
Top Forums Shell Programming and Scripting memory full warning message Post 302204315 by namishtiwari on Wednesday 11th of June 2008 09:14:40 AM
Old 06-11-2008
memory full warning message

Hi I wrote a script
Code:
#!/usr/bin/ksh
#set -x
for fs in `df -k|awk '{print $1}'|sed -n "3,14 p"`
do
    x=`df -kl | grep $fs | awk '{ print $5 }'`
        y=50%

            if [ $x -gt $y ]
                then
                      message="File System `df -k |grep $fs |awk '{print $6\", \"$5}'` Full!!!"
                            echo $subject
                                  echo $message | mailx -s "`hostname` - File System Full Warning !!!"  $RECEIVER
                                      fi
                                      done

here i am not getting the value of x to compare with y because of this the error is coming. how to fix this.

ocuut1@france>./memoryfull_warning
+ ./memoryfull_warning
./memoryfull_warning[8]: test: argument expected
./memoryfull_warning[8]: total: unknown test operator
./memoryfull_warning[8]: test: argument expected
./memoryfull_warning[8]: test: argument expected
./memoryfull_warning[8]: test: argument expected
./memoryfull_warning[8]: total: bad number
./memoryfull_warning[8]: test: argument expected
./memoryfull_warning[8]: test: argument expected
./memoryfull_warning[8]: test: argument expected
./memoryfull_warning[8]: total: unknown test operator
./memoryfull_warning[8]: test: argument expected
./memoryfull_warning[8]: test: argument expected

Last edited by namishtiwari; 06-11-2008 at 10:35 AM..
 

9 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Warning Message.

I have had trouble with my PC, due to construction failure I from my dealer or a power-blast over the net I had a broken MotherBoard, CPU and Memory, So I had to get new ones. Now I'm having a 2000Mhz CPU an ASUS P4S... {I think it's P4S500} and new DDR- memory My PC gives a warning-message... (3 Replies)
Discussion started by: Silver
3 Replies

2. AIX

Printer Memory Message

Hello Everyone, I received the following (root) email. Does anyone know what causes this and how I can find the offending printer? Thanks in advance. Jim Message 2: From daemon Wed Nov 30 09:51:07 2005 Date: Wed, 30 Nov 2005 09:51:07 -0800 From: daemon To: root (2 Replies)
Discussion started by: jlslhills
2 Replies

3. Filesystems, Disks and Memory

Memory full (waiting)

Hi When I launch topas I have this result I have a memory problem. I don't know how see the process which waiting. How can I do that? Thanks all!!! (0 Replies)
Discussion started by: Castelior
0 Replies

4. AIX

AIX 5.3 errpt full of message: DISK OPERATION ERROR

Hi All, Can anyone explain me the meanning of the following errors: LABEL: SC_DISK_ERR2 IDENTIFIER: B6267342 Description DISK OPERATION ERROR Probable Causes DASD DEVICE Failure Causes DISK DRIVE DISK DRIVE ELECTRONICS Recommended Actions PERFORM PROBLEM DETERMINATION... (1 Reply)
Discussion started by: gianlu
1 Replies

5. Programming

shared memory and message queues

Hi, According to my understanding.. When message queues are used, when a process post a message in the queue and if another process reads it from the queue then the queue will be empty unlike shared memory where n number of processess can access the shared memory and still the contents remain... (2 Replies)
Discussion started by: rvan
2 Replies

6. Linux

my box can't see full memory

Hi I'be recently installed Virtouzzo on Centos 5 on 16GB box , but the system could only see 4 GB of RAM, I installed the package kernel-PAE, but the virtuozzo kernel still can't see the full memory. even the kernel system can see 16GB of RAM is there any idea bout that ? Thanks (2 Replies)
Discussion started by: Raied
2 Replies

7. Programming

POSIX Message Queue Memory Allocation

Hi, I wanted to know whether the POSIX message queues are statically allocated memory by the kernel based on the parameters specified in the open or as and when we send messages, memory are allocated? Does the kernel reserve the specified memory for the message queue irrespective of whether... (1 Reply)
Discussion started by: sumtata
1 Replies

8. AIX

Memory full

I need second opinion: I have a AIX system (5.3) and it is at 100% usage of ram now how to deal with this, without affecting the system, because it's a production system ? here is the information about the system: bash-3.2# svmon size inuse free ... (4 Replies)
Discussion started by: misterx12345
4 Replies

9. Shell Programming and Scripting

Unable to get full message text from Windows Event Logs

Hi all, . I am developing a log monitoring solution in perl for Windows I am using the CPAN module Win32 ::EventLog (0.076) version for getting the events from windows. The problem which I am facing now is all the Windows 2008 machines are upgraded with Service pack2 from then I couldn’t able... (2 Replies)
Discussion started by: kar_333
2 Replies
SHCOMP(1)						    User Environment Utilities							 SHCOMP(1)

NAME
shcomp - compile a ksh93 shell script SYNOPSIS
shcomp [ options ] [infile] [outfile]] ORIGIN OF THIS MAN PAGE
This man page was written by Christophe Martin <Schplurtz@free.fr> for the Debian GNU/Linux system. It is based on "shcomp --man" output. DESCRIPTION
Unless -D is specified, shcomp takes a shell script, infile, and creates a binary format file, outfile, that ksh93 can read and execute with the same effect as the original script. Since aliases are processed as the script is read, alias definitions whose value requires variable expansion will not work correctly. If -D is specified, all double quoted strings that are preceded by $ are output. These are the messages that need to be translated to locale specific versions for internationalization. If outfile is omitted, then the results will be written to standard output. If infile is also omitted, the shell script will be read from standard input. OPTIONS
-D, --dictionary Generate a list of strings that need to be placed in a message catalog for internationalization. -n, --noexec Displays warning messages for obsolete or non-conforming constructs. -v, --verbose Displays input from infile onto standard error as it reads it. --man Displays this man page on standard error and exits. --help Shows a short help message and exits. EXIT STATUS
0 Successful completion. >0 An error occurred. DEBIAN WARNING
On a Debian GNU/Linux system, more than one package may provide ksh. the output of shcomp can only be used by ksh93. Any other ksh will be unable to run the compiled script. EXAMPLE
( echo '#! /bin/ksh93' ; shcomp myscript ) > myscript.bin && chmod 755 myscript.bin ./myscript.bin SEE ALSO
ksh(1) IMPLEMENTATION
version shcomp (AT&T Labs Research) 2012-02-29 author David Korn <dgk@research.att.com> copyright Copyright (c) 1982-2012 AT&T Intellectual Property license http://www.eclipse.org/org/documents/epl-v10.html KSH93 Fri Jun 3 2005 SHCOMP(1)
All times are GMT -4. The time now is 02:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy