In bug#1328206 , I need to add queries for power - what's the best solution to do that ?

Asked by Thierry FAUCK

On power/ppc64el system, we would need to enhance current apport reporting tool which some information like file content or commands output including
          "/proc/device-tree/"
            "/proc/loadavg"
            "/proc/locks"
           "/proc/misc"
            "/proc/swaps"
            "/proc/version"
            "/dev/nvram"
            "/var/log/platform"
            "ppc64_cpu --smt"
            "ppc64_cpu --cores-present"
            "ppc64_cpu --cores-on"
            "ppc64_cpu --run-mode"
           "ppc64_cpu --frequency"
           "ppc64_cpu --dscr"

Readme says : For complete instructions, see /usr/share/doc/apport/package-hooks.txt but
cat: /usr/share/doc/apport/package-hooks.txt: No such file or directory

Do I understand correctly I would need to create a file (for example) named : /usr/share/apport/general-hooks/power.py ?

Other questions:
Do you have common functions to put output of commands in logfile ?
do you have common functions to copy config file tree content to log file or should I create the list of file and copy content of each file to the logfile ?

Question information

Language:
English Edit question
Status:
Open
For:
Apport Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask Thierry FAUCK for more information if necessary.

To post a message you must log in.