Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

mounthandler.h File Reference


Detailed Description

The mounthandler will poll the used, available and percent used 1K blocks for a filesystem (similar to 'df').

Wire keywords (standard handler keywords documented in Wire )

Example:
// monitor log partition set percentused create event { name: "/log" priority: 1 } create handler mount { filename: /log percentused: $percentused cycletime: 300 }

Events generated:
Event NameTypeDescription
used AW_EVENT_TYPE_INT32 Number of 1K blocks used
avail AW_EVENT_TYPE_INT32 Number of 1K blocks available percentused AW_EVENT_TYPE_FLOAT32 Percent used

Events accepted:
TypeDescription
Any Causes requested events to be generated

#include "monitor.h"
#include "wire.h"

Go to the source code of this file.

Data Structures

struct  aw_mounthandler_events_t
 Events generated. More...

struct  aw_mounthandler_t
 Timer handler object. More...


Functions

aw_mounthandler_t * aw_create_mounthandler (const aw_mounthandler_events_t *events, const byte_t *filename, int32_t(*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), int32_t(*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), const aw_alarm_sched_t *sched, aw_logger_t *logger)
 Create a user handler.

void aw_free_mounthandler (aw_mounthandler_t *h)
 Free handler and all associated resources.

aw_handler_t * aw_wire_mounthandler (aw_wire_mkhandler_args_t *args)
 Create a mount handler using "wire". See header doc for keyword documentation.


Function Documentation

aw_mounthandler_t* aw_create_mounthandler (  const aw_mounthandler_events_t *  events,
const byte_t *  filename,
int32_t(*  regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
int32_t(*  regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
const aw_alarm_sched_t *  sched,
aw_logger_t *  logger
) 
 

Create a user handler.

aw_create_mounthandler

Parameters:
events Events to generate
filename A path in the files system of interest
regevent Function pointer for event registration
regmaskevent Function pointer for event mask registration
sched Run schedule
logger Logger object
Returns:
Handler object

void aw_free_mounthandler (  aw_mounthandler_t *  h  ) 
 

Free handler and all associated resources.

aw_free_mounthandler

Parameters:
h The handler

aw_handler_t* aw_wire_mounthandler (  aw_wire_mkhandler_args_t *  args  ) 
 

Create a mount handler using "wire". See header doc for keyword documentation.

aw_wire_mounthandler

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)