简体   繁体   English

如何确定当前是否正在运行linux进程记帐(accton)?

[英]How do I determine whether linux process accounting (accton) is currently running?

Is there any way to determine whether process accounting (accton) is running? 有什么方法可以确定是否正在运行流程记帐(accton)? There is no process listed in the process table ("ps"), and I see nothing under "/etc" that I can call with "status" to get a status of accounting. 进程表(“ ps”)中未列出任何进程,并且在“ / etc”下看不到任何可以通过“ status”调用以获取会计状态的信息。

I'm running a custom build based on "Linux From Scratch", so while I understand that CentOS has "psacct", I don't have that available. 我正在运行基于“ Linux From Scratch”的自定义版本,因此尽管我了解CentOS具有“ psacct”,但我没有该版本。

I could watch the log file and see if it's growing - not ideal, but if it's all I got, then it's all I got. 我可以看一下日志文件,看看它是否在增长-不理想,但是如果是我所拥有的,那它就是我所拥有的。 I'm hoping there's a better way. 我希望有更好的方法。

Appreciate any info. 赞赏任何信息。

May be you can do like this. 也许您可以这样做。 enable logging for your accton, an check the log file for update. 启用accton的日志记录,请检查日志文件以进行更新。 like time stamp modification/lat access time/modify time ? 像时间戳修改/延迟访问时间/修改时间?

/sbin/accton /var/log/accto.log then the log will be created. / sbin / accton /var/log/accto.log,然后将创建日志。

Then use some script to monitor your accto.log. 然后使用一些脚本来监视您的accto.log。 There are lot of log file monitoring scripts for nagios if you are interested. 如果您有兴趣,可以使用许多有关nagios的日志文件监视脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM