| bio | website | starshine.org/jimd |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 2 years, 9 months |
| seen | Jun 30 '11 at 0:52 | |
| stats | profile views | 13 |
|
May 6 |
comment |
What's a convenient way of checking what's being added to a log file in realtime? tail -f | grep ... | while read line; do ...; done is an extremely common scripting idiom among sysadmins. (Yes variants of of it using popen() styled subprocesses count as using the same idiom). It's used to selectively process logged events in near real-time (for example to send alerts or initiated automated remediation scripts). |
|
Jan 20 |
comment |
testing services/open ports with telnet? You cannot use telnet over "any TCP port." You can use it over any TCP connectin where the other side accepts text in its protocol handling. (However it is true that many traditional protocols are text based and thus allow the use of telnet for debugging and similar purposes). |
|
Jan 18 |
comment |
Is it possible to stop a shutdown command? @Ken: shutdown -c and [Ctrl]+[c] are entirely different. shutdown -c is a command which cancels a previously scheduled shutdown (even "now" is scheduled in this sense --- but whether the cancellation will prevent the reboot is a bit of a race in that case). [Ctrl]+[c] will cause you terminal to generate a SIGINT (interrupt signal) to whichever process was currently attached to it. This might work on a running shutdown command but that's rather incidental to your question. |
|
Jan 17 |
comment |
How can I pause/resume rsync Also note that Ctrl-Z to suspend a process is likely, after some time, to result in the timeout of any TCP network connections which were established by that program. Thus leaving an rsync suspended for more than a few minutes will very likely cause it to quit abruptly with an error message when you put it back in the foreground and it finds that its opened sockets are returning errors from reads and writes. |
|
Sep 14 |
comment |
Scheduling commands by system inactivity Keep in mind that uptime reports load averages for three different intervals (last minute, last five minutes and last fifteen minutes). In general load average is only the average number of items in the run queue during that time interval. On some systems (Linux in particular) processes in "D" state are counted as runnable. So a system with processes waiting on a slow (or missing) NFS server can appear to have a large load average that has nothing to do with real load on the system. |