char errbuf[1024];
ERROR("uptime plugin: Cannot open " STAT_FILE ": %s",
sstrerror(errno, errbuf, sizeof(errbuf)));
char errbuf[1024];
ERROR("uptime plugin: Cannot open " STAT_FILE ": %s",
sstrerror(errno, errbuf, sizeof(errbuf)));
/* loop done, check if no value has been found/read */
if (ret != 1) {
ERROR("uptime plugin: No value read from " STAT_FILE "");
/* loop done, check if no value has been found/read */
if (ret != 1) {
ERROR("uptime plugin: No value read from " STAT_FILE "");
if (boottime == 0) {
ERROR("uptime plugin: btime read from " STAT_FILE ", "
"but `boottime' is zero!");
if (boottime == 0) {
ERROR("uptime plugin: btime read from " STAT_FILE ", "
"but `boottime' is zero!");
}
ksp = kstat_lookup(kc, "unix", 0, "system_misc");
if (ksp == NULL) {
ERROR("uptime plugin: Cannot find unix:0:system_misc kstat.");
}
ksp = kstat_lookup(kc, "unix", 0, "system_misc");
if (ksp == NULL) {
ERROR("uptime plugin: Cannot find unix:0:system_misc kstat.");
}
if (kstat_read(kc, ksp, NULL) < 0) {
ERROR("uptime plugin: kstat_read failed.");
}
if (kstat_read(kc, ksp, NULL) < 0) {
ERROR("uptime plugin: kstat_read failed.");
}
knp = (kstat_named_t *)kstat_data_lookup(ksp, "boot_time");
if (knp == NULL) {
ERROR("uptime plugin: kstat_data_lookup (boot_time) failed.");
}
knp = (kstat_named_t *)kstat_data_lookup(ksp, "boot_time");
if (knp == NULL) {
ERROR("uptime plugin: kstat_data_lookup (boot_time) failed.");
if (boottime == 0) {
ERROR("uptime plugin: kstat_data_lookup returned success, "
"but `boottime' is zero!");
if (boottime == 0) {
ERROR("uptime plugin: kstat_data_lookup returned success, "
"but `boottime' is zero!");
char errbuf[1024];
ERROR("uptime plugin: No value read from sysctl interface: %s",
sstrerror(errno, errbuf, sizeof(errbuf)));
char errbuf[1024];
ERROR("uptime plugin: No value read from sysctl interface: %s",
sstrerror(errno, errbuf, sizeof(errbuf)));
if (boottime == 0) {
ERROR("uptime plugin: sysctl(3) returned success, "
"but `boottime' is zero!");
if (boottime == 0) {
ERROR("uptime plugin: sysctl(3) returned success, "
"but `boottime' is zero!");
char errbuf[1024];
ERROR("uptime plugin: perfstat_cpu_total: %s",
sstrerror(errno, errbuf, sizeof(errbuf)));
char errbuf[1024];
ERROR("uptime plugin: perfstat_cpu_total: %s",
sstrerror(errno, errbuf, sizeof(errbuf)));