Re: Something Odd - "top" Delivers Nada When Run By Crontab

rbowman <[email protected]>
Newsgroups comp.os.linux.misc
Message-ID <[email protected]>
On Sat, 11 Jul 2026 22:54:10 -0400, c186282 wrote:

> On 7/11/26 02:40, rbowman wrote:
>> On Fri, 10 Jul 2026 23:57:54 -0400, c186282 wrote:
>> 
>>> Wrote a short Python script that uses os.system() to run 'top' ...
>>> redirecting the output to a file. We then clean-up the weird chars in
>>> the file and append it to an ongoing log file.
>> 
>> I think we've been here before...
>> 
>> https://docs.python.org/3/library/subprocess.html
>> 
>> Yes, it's one of those hateful, newfangled functions that might work
>> for you.
> 
>    Um ... there are LOTS of 'monitoring' apps for Linux at this point -
>    just did a survey a couple of days ago. Most are serious OVER-kill.
>    They also tend to record SO much shit that you'll never be able to
>    find YOUR particular problem in the mess.

subprocess is not an app. It is the Python library that is recommended 
rather than the older os.system and has more flexibility but you got 
system to work so go in peace. It probably won't be deprecated and dropped 
any time soon.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.