.. _diagnostic-tools:

.. rst-class:: chapter-with-expand

Diagnostic Tools
----------------

.. index:: diag;diag ping 
.. index:: diag;diag resolve
.. index:: diag;diag free
.. index:: diag;diag disk
.. index:: diag;diag mem
.. index:: diag;diag health
.. index:: diag;diag top
.. index:: diag;diag unittests
.. index:: diag;diag fileguard
.. index:: diag;diag test_connection

There is an extensive list of diagnostic tools available under the **diag** menu.

For example output of **diag** commands, see: :ref:`diag-command-examples`.


::

   platform@VOSS:~$ diag
   USAGE:
   ------
   diag config [<config-item>]                  - Display configuration, optionally specifying the configuration prefix, diag    
                                                  config /platform/network/name                                                
   diag config app <app-config> [<config-item>] - Display application configuration, optionally specifying the configuration     
                                                  prefix, eg diag config app snmp /community                                   
   diag date <epoch timestamp>                  - Convert epoch timestamp to datetime                                            
   diag disk                                    - Display diagnostics for disk usage                                             
   diag epoch <yyyy-mm-dd hh:mm>                - Convert datetime to epoch timestamp                                            
   diag fileguard                               - Run a file integrity check using AIDE (Advanced Intrusion Detection Environment)
                                                  to detect unauthorized or unexpected changes to critical system files.
   diag free                                    - Display diagnostics relating to free memory                                    
   diag health                                  - Display a health report                                                        
   diag health report                           - Save a health report as a logfile                                              
   diag iostat                                  - IO subsystem statistics                                                        
   diag largefiles                              - Find the largest files on your system no more than the top 10 items are display
   diag mem                                     - Display memory diagnostics                                                     
   diag monitor                                 - Display the system resource analysis                                           
   diag monitor list                            - Display the long-term average and maximum system resource usage                
   diag nicstat                                 - Network interface statistics                                                   
   diag ntp                                     - Display ntp status                                                             
   diag ping <host>                             - Ping a remote host to test network reachability                                
   diag proc                                    - Display a list of system processes                                             
   diag resolve <host>                          - Resolve a hostname to IP address                                               
   diag stats                                   - Display the container statistics                                               
   diag tasks                                   - Display constant task listing                                                  
   diag test_connection <host> <port>           - Test if system can open a connection to a remote port                          
   diag top                                     - Process resource statistics                                                    
   diag traceroute <host>                       - Discover the network path to <host>                                            
   diag vmstat                                  - Virtual memory subsystem statistics                                            



.. rubric:: Command Descriptions

Some of the commands are provided with details below:


.. tabularcolumns:: |p{5cm}|p{9cm}|

+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Command                                | Description                                                                                                                                                                                                                                                               |
+========================================+===========================================================================================================================================================================================================================================================================+
| **diag ping <host>**                   | Test network reachability to a network host.                                                                                                                                                                                                                              |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag resolve <hostname>**            | Test DNS resolution of a hostname.                                                                                                                                                                                                                                        |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag test_connection <host> <port>** | Given a host IP and port number, return a message: "Successfully connected to <host>:<port>" or "Failed to connect to <host>:<port>".                                                                                                                                     |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag free**                          | Display the memory usage.                                                                                                                                                                                                                                                 |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag disk**                          | Display the disk usage. Logical volumes for the database have the format ``/dev/mapper/voss-dbroot``.                                                                                                                                                                     |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag largefiles**                    | Display up to 10 largest files on the system over 1GB in size, else no files are shown.                                                                                                                                                                                   |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag mem**                           | Display a more detailed memory usage by process.                                                                                                                                                                                                                          |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag ntp**                           | Display details of ntp server, including peers and host addresses. Equivalent to the ``ntp -pn`` command.                                                                                                                                                                 |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag health**                        | Display a comprehensive health summary. This includes status on the following: CPU, Memory, Disk, Security Update, Application, Cluster, Cluster Failover and Health email scheduling. Logical volumes used by the database have the format: ``/dev/mapper/voss-dbroot``. |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag top**                           | Display a single Unix top summary.                                                                                                                                                                                                                                        |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag unittests**                     | Utility for developers only. Note that services will be restarted by this utility.                                                                                                                                                                                        |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **diag fileguard**                     | Although a checksum of system and configuration files is carried out regularly, a manual check for changes since the previous check can be carried out. If any files have changed, these will be listed in the command output.                                            |
|                                        | File tamper detection and integrity monitoring is also carried out. If any files have changed, these will be listed in the command output.                                                                                                                                |
+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

For **diag health**, see also :ref:`diagnostic-troubleshoot`.



.. |VOSS Automate| replace:: VOSS Automate
.. |Unified CM| replace:: Unified CM
