- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Buffering in the UNIX shells.
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
08-28-2000 01:07 PM
08-28-2000 01:07 PM
Buffering in the UNIX shells.
In my case its KSH.
Does anyone know if it's possible to turn off buffering in the KSH? I am running a batch process in the background that writes to a file, I would like to monitor this file with tail -f as the process runs.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 01:17 PM
08-28-2000 01:17 PM
Re: Buffering in the UNIX shells.
Depends on type of apps as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 01:21 PM
08-28-2000 01:21 PM
Re: Buffering in the UNIX shells.
If you have a process running in the background that is writing to a logfile, use tail -f on the logfile and the screen will scroll as activity is written to the logfile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 01:21 PM
08-28-2000 01:21 PM
Re: Buffering in the UNIX shells.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 01:40 PM
08-28-2000 01:40 PM
Re: Buffering in the UNIX shells.
The man pages for tail provide a few interesting comments:
Under a discussion of the -f option..."tail enters an endless loop wherein it sleeps for one second then attempts to read and copy further records from the input file)."
This might suggest that you will not see characters until a newline character is passed (?).
Also: "Tails relative to end-of-file are stored in a 20-Kbyte buffer, and thus are limited in length. Therefore, be wary of the results when piping output from other commands into tail."
Hopefully this provides some insight (?).
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 06:17 AM
08-29-2000 06:17 AM
Re: Buffering in the UNIX shells.
Thanks Antoinette you point out it depends on the apps used. Let me rephrase it:
Is it possible from KSH (or in UNIX) to have the effect of the C function call: setbuf(stdout, NULL)? Within the application itself, buffering is not disabled; I would like to disable it for monitory testing purposes without modifying my application.
Thanks,
Leslie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 10:57 AM
08-29-2000 10:57 AM
Re: Buffering in the UNIX shells.
Did you try to use nobuffering in the application and eventually at compillation time use buffering, debug ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 11:07 AM
08-29-2000 11:07 AM
Re: Buffering in the UNIX shells.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 11:22 AM
08-29-2000 11:22 AM
Re: Buffering in the UNIX shells.
On the other hand, if I do modify my application with a call to setbuf() I get the desired results, even with tail -f.
I would like to avoid the modification of the application by simply doing...
Well that's my question.
Thanks,
Leslie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 12:54 PM
08-29-2000 12:54 PM
Re: Buffering in the UNIX shells.
I don't thing you can avoid the modification to your application. Seems like 'tail' is written to wait for the newline (as the man page material I high-lighted above states), and you're "stuck" with that as its implementation.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 01:00 PM
08-29-2000 01:00 PM