Skip to content

Conversation

@mremy
Copy link
Contributor

@mremy mremy commented Apr 17, 2012

This patch use the utxent function family to collect the user data. It improve the check speed.
Need a system conforming to POSIX.1-2001.

Tested only on Debian Squeeze x86_64.
Already sent: ID: 3373486
http://sourceforge.net/tracker/?func=detail&atid=397599&aid=3373486&group_id=29880

This patch use the utxent function family to collect the user data. It improve the check speed.
Need a system conforming to POSIX.1-2001.
@ghost ghost assigned weiss Jun 7, 2012
@weiss
Copy link
Member

weiss commented Jun 7, 2012

We pulled the commit, thanks.

@weiss weiss closed this Jun 7, 2012
sni added a commit to sni/monitoring-plugins that referenced this pull request Nov 4, 2024
somehow check_disk crashes on opensuse 15 sp6:

    Core was generated by `.../monitoring-plugins/check_disk -w 80% -c 90% -p /'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x00007ffff74ca6b6 in __strlen_sse2 () from /lib64/libc.so.6
    (gdb) bt
    #0  0x00007ffff74ca6b6 in __strlen_sse2 () from /lib64/libc.so.6
    monitoring-plugins#1  0x00007ffff7f81aed in dopr (buffer=0x0, maxlen=0, format=0x40a607 "%s inode=-)%s;", args_in=0x7fffffffda30) at lib/snprintf.c:712
    monitoring-plugins#2  0x00007ffff7f82c6c in smb_vsnprintf (str=0x0, count=0, fmt=0x40a5f0 "%s%s %s %llu%s (%.1f%%", args=0x7fffffffda30) at lib/snprintf.c:1197
    monitoring-plugins#3  0x00007ffff7f82d79 in vasprintf (ptr=0x7fffffffdba8, format=0x40a5f0 "%s%s %s %llu%s (%.1f%%", ap=0x7fffffffda78) at lib/snprintf.c:1232
    monitoring-plugins#4  0x0000000000405cf9 in xvasprintf (strp=0x7fffffffdba8, fmt=<optimized out>, ap=<optimized out>) at utils.c:563
    monitoring-plugins#5  0x0000000000405db7 in xasprintf (strp=strp@entry=0x7fffffffdba8, fmt=fmt@entry=0x40a5f0 "%s%s %s %llu%s (%.1f%%") at utils.c:575
    monitoring-plugins#6  0x0000000000402d9f in main (argc=<optimized out>, argv=<optimized out>) at check_disk.c:434
    (gdb) f 6
    monitoring-plugins#6  0x0000000000402d9f in main (argc=<optimized out>, argv=<optimized out>) at check_disk.c:434
    434               xasprintf (&output, "%s%s %s %llu%s (%.1f%%",
    (gdb) p flag_header
    $1 = 0x1cbf0 <error: Cannot access memory at address 0x1cbf0>
    (gdb)

initializing flag_header helps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants