/[monit]/monit/status.c
ViewVC logotype

Diff of /monit/status.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.41 by martinp, Fri Aug 15 20:50:18 2003 UTC revision 1.42 by hauk, Sun Aug 31 21:33:45 2003 UTC
# Line 150  static void local_status(Service_T s) { Line 150  static void local_status(Service_T s) {
150      break;      break;
151    
152    case TYPE_DEVICE:    case TYPE_DEVICE:
153      if(!DeviceInfo_Usage(s->devinfo, s->path) || stat(s->path, &stat_buf) != 0 ) {      if(!DeviceInfo_Usage(s->devinfo, s->path)||stat(s->path, &stat_buf) != 0 ) {
154        fprintf(stdout,        fprintf(stdout,
155          "Device '%s' is not accessible\n\t"          "Device '%s' is not accessible\n\t"
156          "Space: - Inodes: -\n\t"          "Space: - Inodes: -\n\t"
# Line 183  static void local_status(Service_T s) { Line 183  static void local_status(Service_T s) {
183                  "UID: %d GID: %d Permission: %o\n",                  "UID: %d GID: %d Permission: %o\n",
184                  s->name,                  s->name,
185                  (float) 100 * (s->devinfo->f_blocks -                  (float) 100 * (s->devinfo->f_blocks -
186                                 s->devinfo->f_blocksfreetotal) / s->devinfo->f_blocks,                                 s->devinfo->f_blocksfreetotal)
187                    / s->devinfo->f_blocks,
188                  (float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) /                  (float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) /
189                  1048576 * s->devinfo->f_bsize,                  1048576 * s->devinfo->f_bsize,
190                  (int)stat_buf.st_uid, (int)stat_buf.st_gid,                  (int)stat_buf.st_uid, (int)stat_buf.st_gid,
# Line 220  static void local_status(Service_T s) { Line 221  static void local_status(Service_T s) {
221        }        }
222        break;        break;
223                
224      case TYPE_REMOTE:
225          fprintf(stdout,
226                  "Host '%s'\n\tStatus is not available\n", s->name);
227          break;
228          
229    default:    default:
230        break;        break;
231                
# Line 278  static int remote_status(Service_T s) { Line 284  static int remote_status(Service_T s) {
284        if(starts_with(buf, "Process ") ||        if(starts_with(buf, "Process ") ||
285           starts_with(buf, "Device ") ||           starts_with(buf, "Device ") ||
286           starts_with(buf, "File ") ||           starts_with(buf, "File ") ||
287           starts_with(buf, "Directory ")) {           starts_with(buf, "Directory") ||
288             starts_with(buf, "Host")) {
289                    
290          fprintf(stdout, "%s", buf);          fprintf(stdout, "%s", buf);
291                    

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26