NUT Using Excessive CPU



  • @dennypage 2.4.4-RELEASE with nut sysutils 2.7.4_7 same issue:

    PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND
    82732 uucp 52 0 6452K 2504K RUN 0 252.2H 57.08% /usr/local/sbin/upsmon

    Any clue on how to diagnostic this issue?



  • @jompigrande can't be the same issue. @mrsunfire solved it two messages above.



  • @Gertjan Sorry, not the same issue, im talking about CPU usage 57.02% upsmon 34.26% upsd its too high, something wrong its happening



  • @jompigrande said in NUT package:

    @Gertjan Sorry, not the same issue, im talking about CPU usage 57.02% upsmon 34.26% upsd its too high, something wrong its happening

    started all the services from /usr/local/etc/rc.d/nut.sh by hand, one on each console with debugging flags enabled to see if i can find something.

    im seeing that all starts after upsd running seems to be poolling too many times:

    5.148865 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.148874 mainloop: polling 4 filedescriptors
    5.148918 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.148926 mainloop: polling 4 filedescriptors
    5.148970 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.148979 mainloop: polling 4 filedescriptors
    5.149023 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149031 mainloop: polling 4 filedescriptors
    5.149077 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149085 mainloop: polling 4 filedescriptors
    5.149129 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149137 mainloop: polling 4 filedescriptors
    5.149182 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149190 mainloop: polling 4 filedescriptors
    5.149234 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149243 mainloop: polling 4 filedescriptors
    5.149288 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149296 mainloop: polling 4 filedescriptors
    5.149341 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149357 mainloop: polling 4 filedescriptors
    5.149473 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149491 mainloop: polling 4 filedescriptors
    5.149545 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149563 mainloop: polling 4 filedescriptors
    5.149620 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149629 mainloop: polling 4 filedescriptors
    5.149675 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149683 mainloop: polling 4 filedescriptors
    5.149729 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149737 mainloop: polling 4 filedescriptors
    5.149781 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149790 mainloop: polling 4 filedescriptors
    5.149835 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149843 mainloop: polling 4 filedescriptors
    5.149888 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149896 mainloop: polling 4 filedescriptors
    5.149940 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.149948 mainloop: polling 4 filedescriptors
    5.149993 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.150001 mainloop: polling 4 filedescriptors
    5.150046 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.150054 mainloop: polling 4 filedescriptors
    5.150099 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.150107 mainloop: polling 4 filedescriptors
    5.150152 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.150160 mainloop: polling 4 filedescriptors
    5.150205 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.150213 mainloop: polling 4 filedescriptors
    5.150257 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.150265 mainloop: polling 4 filedescriptors
    5.150310 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.150318 mainloop: polling 4 filedescriptors
    5.150362 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.150370 mainloop: polling 4 filedescriptors
    5.150414 write: [destfd=7] [len=31] [VAR UPSXXX ups.status "OL"]
    5.150422 mainloop: polling 4 filedescriptors



  • @jompigrande Can you start by posting your config please? Preferable the <nut> section from the config file. Failing that, a screenshot of the config.

    Also, is there anything showing in the system logs for either "nut" or "ups"?



  • @dennypage sorry my bad, hope that this can help anyone else, i was setting custom options on upsmon.conf badly:
    Previous setting (bad one):
    POLLFREQ = 60
    DEADTIME = 120

    New setting correct format:
    POLLFREQ 60
    DEADTIME 120

    Thanks!



  • @jompigrande Unfortunate that NUT doesn't complain bitterly about that...

    Glad you got it fixed.


Log in to reply