- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- egrep: can't open output.txt error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2007 08:03 AM
10-04-2007 08:03 AM
'egrep: can'open output.txt' error is generated(everyday 20000 entries) by unknown unix job process and appending to the unknown file in root partion. Due to this, root partion is growning 7% per week.
Initially, the above errors appending to rc.log file /etc directory. I written a perl script to remove the appended error lines in the rc.log and executed using crontab every day.
Then instead of adding the error lines to /etc/rc.log, it used to write into /etc/rc.log.old file. I ran the same perl script to remove the error lines for both files and scheduled.
After few days, it is stopped writing to the rc.log and rc.log.old files and writing(appending) to another file in the root partion.
How to identify which file it is appending and how to remove this error permanently. I am worried that it is going to fill entire root partion in a few weeks.
We are using HP UX 11.11 O/S on RP5470 computer.
Thanks for help,
Rao
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2007 08:19 AM
10-04-2007 08:19 AM
Re: egrep: can't open output.txt error
# find / -xdev -type f -exec egrep -il "egrep|output.txt" {} +
After obtaining the unknown filename...use lsof to figure out the process that is writing to the (now known) file i.e.
# lsof "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2007 08:21 AM
10-04-2007 08:21 AM
Re: egrep: can't open output.txt error
The culprit script would seem to be in your startup directories. Do:
# grep -e egrep -e output.txt /sbin/init.d/*
...to find the likely one.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2007 08:23 AM
10-04-2007 08:23 AM
SolutionIt's always bad to treat the symptoms rather than the problem itself which your Perl script has done. You threw away the early data which would potentially have been very helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2007 09:51 AM
10-04-2007 09:51 AM
Re: egrep: can't open output.txt error
use lsof to try and isolate who has the files open
lsof /the_file_in_question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2007 08:22 AM
11-13-2007 08:22 AM
Re: egrep: can't open output.txt error
I have rebooted the UNIX production box and got the space back. It is cleared the space after the reboot.
Rao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2007 08:23 AM
11-13-2007 08:23 AM