It must be a sparse file, to blow up like that when copied. Compare ls -lh nohup.out with du -hs nohup.out, if they differ significantly, nohup.out is sparse.
As for why nohup.out is sparse, have you been truncating the file while its still live? This will cause large amounts of empty space at the beginning of the file since the process will continue writing at the "end". They won't be stored on disk, just assumed to be there, until you copy it.
That problem will need to be taken care of before you can copy the file.
Thank you very much for a quick respond.
This is new to me. They are different when using ls -lh and du -sh.
====================
/dir > ls -lh nohup.out
-rw------- 1 a b 1.7G Mar 10 15:02 nohup.out
/dir > du -sh nohup.out
3.9M nohup.out
/dir >
==================
How can I solve this problem ?
thank you vey much.
Whatever is writing these nohup.out files will need modification, to prevent it writing sparse files. What you're doing right now isn't working, it's generating these weird sparse files instead of starting over at position zero.
What's writing these logfiles? Can you show us the code? You may be able to convince it to move its own logfiles on command.
Hello,
I wanted to search specific string in the acitve log file and send an email if the search string found in the log.
Log file is written by application all the time. So, script has to search if any new log entry has the specific string for example " sample exception" and send an email. (1 Reply)
#!/bin/bash
for digit in $(seq 1 10)
do
if ping -c1 -w2 192.168.1.$digit &> /dev/null
then
echo "192.168.1.$digit is UP"
else
echo "192.168.1.$digit is DOWN"
fi
done (3 Replies)
What kind of problems can be faced if any session which connects to unix server is open for longer time?
How to find out from how much time that session is idle? :) (2 Replies)
I need some help please...
This is the scenario what I am sitting with.
1 - I am kicking of a batch script.
2 - This batch script is writing to an active log file which is also use by other batch scripts.
3 - I need to monitor this active log file and grep for the script name as well as the... (3 Replies)
Hi,
I need to configure 4 ip address (same subnet and mask) in one ipmp group (two interfaces) in an active active formation (link based). Can some one provide the steps or a tutorial link.
Thanks (2 Replies)
I have some Solaris processes that run weeks at a time that create rather large log files that I would like to archive/compress daily. Instead of stopping the process, what can be done so that the log file is backed up and shrunk, but the process can still log to the open file handle without major... (7 Replies)
Hi all,
I am new to HACMP. So sorry for the newie question. But I did search the forum and it seems that no one asks this before.
So if a 2-node cluster runs in active-active mode (and the same application), what is the benefit of using HACMP ?
If it runs in active-stanby, it is easy to... (9 Replies)
Hi Gurus,
I am facing a problem with grepping a set of data in active log file which are the info not in uniform, below is the sample data information.
I am trying to grep value.
Connect_PM Connect to APPS gateway failed
ERROR connection to host anyserver.com, service 6600 timed out
... (4 Replies)