How to count the number of devices in eHealth

Document ID : KB000056950
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary:

This document will explain how to a get a total device count of what's in your eHealth configuration.

Background:

Often is the case where your element configuration exceeds the total supported configuration for your OS flavor. Or you simply need a nicely formatted output of all your devices currently in eHealth.

Instructions:

Download and extract this file to your eHealth system while logged in as the $NH_USER: eHealth Device Counting.zip

eHealth nhsPrintDevices.sh

The script is run with no arguments. It will output to stdout comma separated output suitable for importing into excel. There is a single header row specifying the column names, and each row after that represents a device. For each device, the device key, name, sysName, ip address, number of ports/interfaces, and whether the device uses QoS. Only devices that have at least one unretired and polling enabled element are emitted. When counting interfaces for a device, only interfaces that are polling enabled and unretired are counted.

Usage / Examples Options:

 

  1. Output to STDOUT:

    $   ./nhsPrintDevices.sh
    device_key,device_name,sys_name,ip_address,ports,qos
    55bfe500000beac8,,marjo46-rtr-01.ca.com,138.42.188.60,3,
    5454067f0001f018,LEOJU04-VM66907-SH,LEOJU04-VM66907,10.130.228.68,1,
    536b8e300004fd58,marjo46-rtr-01-RH,marjo46-rtr-01.ca.com,138.42.187.241,2,
    55ccdb1a0004e200,USEA-UIT-EHLTH1.na.uis-SH,USEA-UIT-EHLTH1.na.uis.unisys.com,10.132.17.3,21,

  2. To get a quick device count, you can just run it this way:

    $ ./nhsPrintDevices.sh |wc -l
         5

  3. To redirect to a file for import into excel:

    ./nhsPrintDevices.sh >deviceCount.csv
File Attachments:
TEC1125966.zip