monitube2-mgmt_main.c File Reference

Contains main entry point. More...

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

Go to the source code of this file.


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


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)


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 monitube2-mgmt_main.c.

Define Documentation

#define DNAME_MONITUBE_MGMT   "monitube2-mgmt"

Constant string for the daemon name

Definition at line 545 of file monitube2-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 551 of file monitube2-mgmt_main.c.

Referenced by monitube_init().

Function Documentation

int main ( int  argc,
char **  argv 

Intializes monitube-mgmt's environment

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

Definition at line 686 of file monitube2-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

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

Definition at line 589 of file monitube2-mgmt_main.c.

References clear_config(), clear_stats(), 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

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

Definition at line 656 of file monitube2-mgmt_main.c.

References clear_config(), clear_stats(), LOG, and pmon.

Referenced by monitube_sigterm().

static void monitube_sigterm ( int signal_ign  __unused  )  [static]

Shutdown app upon a SIGTERM.

[in] signal_ign Always SIGTERM (ignored)

Definition at line 574 of file monitube2-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 265 of file monitube2-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:04 2010 for SDK Your Net Corporation Monitube2 IPTV Monitoring Example: monitube2-mgmt 1.0 by Doxygen 1.5.1