Re: [PATCH] CPU module, fixes to disk module and service module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2011-02-04 at 01:16 +0000, Tomas Edwardsson wrote:
> This patch introduces a new module, cpu.py and includes fixes for
> disk.py and service.py.
> 
> cpu.py exposes cpu information. It has two methods:
> * cpu_sample_percentage - gets the average cpu usage, returns per cpu
> percentage for user, nice, system, idle, iowait and irq.
> * jiffies - fetches cpu statistics from /proc/stat and returns them

this looks fine.

> disk.py modifications
> * Add filesystem type returned by disk.usage()

also fine

> 
> service.py modifications
> * chkconfig and /sbin/service now run with environment variable
> LANG=C, tools were returning internationalized strings which wouldn't
> parse correctly.

this looks like a good idea.

> * Rewrote get_running(), now lists scripts from /etc/init.d and runs
> status itself instead of running /sbin/service
> --status-all. /sbin/service was returning internationalized strings
> and ignoring LANG variable.

A little worried here. Using /etc/init.d directly is kinda contrary to
the whole point of chkconfig and /sbin/service. I'm also not in love
with the hardcoded list of things to skip. Feels like it is going to be
annoying to maintain.

Maybe just run the ones and catch the error if it lacks a 'status'?

What's the impact if we raise properly?

-sv



_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list


[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux