monitube-mgmt_main.c File Reference

Contains main entry point. More...

#include <sync/common.h>
#include <jnx/pmon.h>
#include "monitube-mgmt_main.h"
#include "monitube-mgmt_config.h"
#include "monitube-mgmt_conn.h"
#include "monitube-mgmt_kcom.h"
#include "monitube-mgmt_logging.h"

Go to the source code of this file.

Defines

#define DNAME_MONITUBE_MGMT   "monitube-mgmt"
#define PMON_HB_INTERVAL   30

Functions

static void monitube_sigterm (int signal_ign __unused)
static int monitube_init (evContext ctx)
void monitube_shutdown (boolean do_exit)
int main (int argc, char **argv)

Variables

const parse_menu_t master_menu []
static junos_pmon_context_t pmon
 health monitoring handle


Detailed Description

Contains main entry point.

Contains the main entry point and registers the application as a JUNOS daemon

Definition in file monitube-mgmt_main.c.


Define Documentation

#define DNAME_MONITUBE_MGMT   "monitube-mgmt"

Constant string for the daemon name

Definition at line 829 of file monitube-mgmt_main.c.

Referenced by main().

#define PMON_HB_INTERVAL   30

The heartbeat interval to use when setting up process health monitoring

Definition at line 835 of file monitube-mgmt_main.c.

Referenced by monitube_init().


Function Documentation

int main ( int  argc,
char **  argv 
)

Intializes monitube-mgmt's environment

Parameters:
[in] argc Number of command line arguments
[in] argv String array of command line arguments
Returns:
0 upon successful exit of the application (shouldn't happen) or non-zero upon failure

Definition at line 968 of file monitube-mgmt_main.c.

References DNAME_MONITUBE_MGMT, master_menu, monitube_config_read(), and monitube_init().

static int monitube_init ( evContext  ctx  )  [static]

Callback for the first initialization of the RE-SDK Application

Parameters:
[in] ctx Newly created event context
Returns:
SUCCESS if successful; otherwise EFAIL with an error message

Definition at line 873 of file monitube-mgmt_main.c.

References clear_config(), close_connections(), init_config(), init_server(), kcom_init(), kcom_shutdown(), LOG, monitube_sigterm(), pmon, and PMON_HB_INTERVAL.

Referenced by main().

void monitube_shutdown ( boolean  do_exit  ) 

Shutdown app and opitonally exit with status 0

Parameters:
[in] do_exit if true, log a shutdown message and call exit(0)

Definition at line 939 of file monitube-mgmt_main.c.

References clear_config(), close_connections(), kcom_shutdown(), LOG, and pmon.

Referenced by monitube_sigterm().

static void monitube_sigterm ( int signal_ign  __unused  )  [static]

Shutdown app upon a SIGTERM.

Parameters:
[in] signal_ign Always SIGTERM (ignored)

Definition at line 858 of file monitube-mgmt_main.c.

References monitube_shutdown().

Referenced by monitube_init().


Variable Documentation

const parse_menu_t master_menu[]

main menu of commands

Definition at line 299 of file monitube-mgmt_ui.c.

Referenced by main().


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:27:03 2010 for SDK Your Net Corporation Monitube IPTV Monitoring Example: monitube-mgmt 1.0 by Doxygen 1.5.1