LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 04-27-2009, 11:37 AM   #1
malar
LQ Newbie
 
Registered: Feb 2006
Posts: 27

Rep: Reputation: 15
RHEL5 - Modify /usr/bin/script to include flushtime attribute


I am wanting to use the /usr/bin/script binary to log my users' sessions. It is working well, however if a user disconnects their session without logging out properly, anything in the buffer that has not yet been written to file is lost.

I have been searching for different versions of this program, and it seems that on most BSD distros there is a "flushtime" attribute on the -t switch that allows you to set how often the buffer is written to file. I think this would be a good fix, but that option doesn't exist in the version on RHEL or Fedora. There is a -t flag, but all it does is add date/time stamps to the log file. There is also a -f flush switch on RHEL but I have been unsuccessful with it so far.

Does anyone have any suggestions on replacing the /usr/bin/script program with one from another distro? Or perhaps recompiling/reinstalling? I have tried just simply compiling one of the BSD versions of script.c on my box but I am not that familiar with C and it spits out a bunch of errors that I do not understand. Any help would be greatly appreciated. Thanks!!
 
Old 04-27-2009, 05:54 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,991
Blog Entries: 54

Rep: Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744
Instead of 'script' check out 'rootsh'?
 
Old 04-28-2009, 11:12 AM   #3
malar
LQ Newbie
 
Registered: Feb 2006
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks! That may work. I am trying it now. It seems to log pretty close to real time, and it seems to close cleanly when I close a session without exiting properly. It's nice that it appends the word "closed" to the end of a log file when the session is exited properly, that way I can see who is doing that and who isn't. This was a great tip and I will let you know asap how it goes.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to chck remot comnd executin using shells /usr/bin/ssh and /usr/bin/rsh farnaw4u Linux - Software 2 04-06-2009 12:08 AM
cluster on rhel5 make giving error /usr/bin/ld: cannot find -ldlm xxx_anuj_xxx Linux - Software 3 05-18-2008 10:15 AM
which headers usr/include/ or /usr/include/nptl/? Chris.Rector Linux - Enterprise 0 02-02-2007 01:40 PM
cant modify /usr/local/bin folder surgey Linux - Newbie 4 05-10-2005 05:52 PM
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 01:02 AM


All times are GMT -5. The time now is 10:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration