Computing.Net > Forums > Unix > *URG* capture mesg file system full

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

*URG* capture mesg file system full

Reply to Message Icon

Name: vmtrt
Date: September 17, 2004 at 07:08:04 Pacific
OS: HP UX 11i
CPU/Ram: 256
Comment:

Hi,


I am running a couple of perl scripts from the main shell. I have used "|| die" on all open and print commands used within the perl to trap the error. And in the main script I want to record any error messages into the log file, so i used script.pl >>logfile. But when the disk is full, the following error is printed on the screen and perl as well as the main script is exiting out successfully. I want the perl to fail and print the error in the log file.

Error: msgcnt 2029 vxfs: mesg 001: vx_nospace - /dev/vg03/lvol27 file system full (1 bl
ock extent)

Main script:

Scripts.pl >> $LOGFILE
k=$?
if test $k -gt 0
then
$Scripts/mailpost "failed" $mail_recipient $LOGFILE
exit 2
fi
echo "success " >> $LOGFILE

Perl used:

$dir='/dir/';
$datafile=$tgt_dir.'data.out';
open(DATA,"<$datafile") || die "can't open datafile";
%files_open = ();
while ($line = <DATA>) {
$chr=($line, 7, 8);
$file_name=$chr;
if( $chr eq "A")
{
if( -e $Data4.$file_name ){
open(INFO, ">>/dir/$file_name")|| die "filesystem error";
print INFO "$line" || die "filesystem error, no space" ;
close(INFO);
}#close if
else{
open(NEW,">/dir/$file_name")|| die "filesystem error";
print NEW "$line" || die "filesystem error, no space";
close(NEW);
}#close else
}


Urgent...Any help is greatly appreciated....

Thanks
vmtrt



Sponsored Link
Ads by Google

Response Number 1
Name: vmtrt
Date: September 17, 2004 at 07:12:51 Pacific
Reply:

Actullay i used script.pl 2>> logfile in the main script, still could not trap the error message


0

Response Number 2
Name: Don Arnett
Date: September 17, 2004 at 11:48:02 Pacific
Reply:

If the disk is full, how would you expect something to write to the error file? To write to the error file, there has to be some disk space available to write the error message to.

Unless the error message is coming from a different file system.

But, in either case, I doubt that the "disk full" message is coming from your script or any programs that your script calls. The disk full message is probably coming from the operating system.

Now, take note, I did not say that your script is not causing the "disk full" message, I just said that the message is not being output by your program or anything that your program calls. The error message is coming from the OS, which your program doesn't capture output from.


0

Response Number 3
Name: vmtrt
Date: September 17, 2004 at 12:55:52 Pacific
Reply:

I am actually the logs to different disk. so there is no space issue there.

Is there a way to capture the operating system error

Thanks .....


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


command for changing uppe... unix gui



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: *URG* capture mesg file system full

File system full !! Why? & How? www.computing.net/answers/unix/file-system-full-why-amp-how/2329.html

file system full messages www.computing.net/answers/unix/file-system-full-messages/6403.html

File system www.computing.net/answers/unix/file-system/2324.html