### Install and Start MySQL Server Source: https://github.com/voipmonitor/sniffer/blob/master/README_centos.md Installs the MySQL server package, enables it to start on boot, and starts the service. This is required for the VoIPmonitor database. ```bash yum install mysql-server chkconfig mysqld on service mysqld start ``` -------------------------------- ### Database Setup and Service Configuration Source: https://github.com/voipmonitor/sniffer/blob/master/README_ubuntu-12-04LTS.md Creates the database, imports the schema, copies configuration files, and starts the VoIPmonitor service. ```bash mkdir /var/spool/voipmonitor mysqladmin create voipmonitor cat cdrtable.sql | mysql voipmonitor cp config/voipmonitor.conf /etc/ #edit file /etc/voipmonitor.conf to your needs cp config/init.d/voipmonitor /etc/init.d/ update-rc.d voipmonitor defaults /etc/init.d/voipmonitor start ``` -------------------------------- ### Install and Start Apache Web Server and PHP Source: https://github.com/voipmonitor/sniffer/blob/master/README_centos.md Installs the Apache web server, PHP, and necessary PHP modules for the web interface. It also enables Apache to start on boot and starts the service. ```bash yum install httpd php php-gd php-mysql php-process chkconfig httpd on service httpd start ``` -------------------------------- ### Download and Run VoIPmonitor Sniffer (Static Binary) Source: https://github.com/voipmonitor/sniffer/blob/master/README.md Use this method for a quick setup without requiring compilation. Ensure you have wget and tar installed. The sniffer is run with the network interface as an argument. ```bash # 64-bit wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz tar xzf current-stable-sniffer-static-64bit.tar.gz cd voipmonitor-* # Run sniffer ./voipmonitor -i eth0 ``` -------------------------------- ### Deploy and Start VoIPmonitor Sniffer Service Source: https://github.com/voipmonitor/sniffer/blob/master/README_debian.md Installs the compiled sniffer, copies the configuration file, sets up the init script for automatic startup, and starts the service. Remember to edit the configuration file to your specific needs. ```bash make install cp config/voipmonitor.conf /etc/- #edit file /etc/voipmonitor.conf to your needs cp config/init.d/voipmonitor /etc/init.d/ update-rc.d voipmonitor defaults /etc/init.d/voipmonitor start ``` -------------------------------- ### Build and Install voipmonitor Source: https://github.com/voipmonitor/sniffer/blob/master/README_gentoo.md Compile and install voipmonitor from source. This includes cleaning the build, making the application, installing it, and copying configuration files. ```bash cd /path/to/voipmonitor make clean make make install cp config/voipmonitor.conf /etc/ cp config/init.d/voipmonitor /etc/init.d/ ``` -------------------------------- ### Install Dependencies and Compile VoIPmonitor Source: https://github.com/voipmonitor/sniffer/blob/master/README_ubuntu-12-04LTS.md Installs necessary packages, checks out the source code, configures, compiles, and installs VoIPmonitor. ```bash apt-get install build-essential subversion libvorbis-dev libpcap-dev apache2 php5-mysql php5-gd mysql-server unixodbc-dev libapache2-mod-php5 tshark libmysqlclient-dev zlib1g-dev cd /usr/src svn co https://voipmonitor.svn.sourceforge.net/svnroot/voipmonitor/trunk voipmonitor-svn cd voipmonitor-svn ./configure make clean make make install ``` -------------------------------- ### Install Recommended Alloc Library Source: https://github.com/voipmonitor/sniffer/blob/master/README_raspbian.md Installs libtcmalloc for potentially faster memory allocation. This is an optional but recommended step. ```bash apt-get install libtcmalloc-minimal4 ``` -------------------------------- ### Install VoipMonitor SVN Trunk Source: https://github.com/voipmonitor/sniffer/blob/master/README_ubuntu-10-04LTS.md Installs VoipMonitor and its dependencies, checks out the trunk version from SVN, compiles, installs, and sets up the database. ```bash sudo apt-get install subversion libvorbis-dev libpcap-dev apache2 php5-mysql php5-gd unixodbc-dev libapache2-mod-php5 cd /usr/src svn co https://voipmonitor.svn.sourceforge.net/svnroot/voipmonitor/trunk voipmonitor-svn cd voipmonitor-svn make clean make make install mkdir /var/spool/voipmonitor chown www-data /var/spool/voipmonitor mysqladmin create voipmonitor cat cdrtable.sql | mysql voipmonitor ``` -------------------------------- ### Install MySQL Development Libraries Source: https://github.com/voipmonitor/sniffer/blob/master/README_ubuntu-10-04LTS.md Installs the MySQL client development libraries required for VoipMonitor. ```bash sudo apt-get install libmysqlclient15-dev ``` -------------------------------- ### Build and Install voipmonitor (simplified) Source: https://github.com/voipmonitor/sniffer/blob/master/README_gentoo.md A simplified build and installation process for voipmonitor, omitting the 'make clean' step. Ensure to edit the configuration file and prepare the MySQL table before running. ```bash cd /path/to/voipmonitor make make install cp config/voipmonitor.conf /etc/ cp config/init.d/voipmonitor /etc/init.d/ ``` -------------------------------- ### Install libpcap 1.1.1 Source: https://github.com/voipmonitor/sniffer/blob/master/README_ubuntu-10-04LTS.md Installs necessary build tools and compiles libpcap from source. Ensure you have wget and tar installed. ```bash sudo apt-get install flex sudo apt-get install bison cd /usr/src wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz tar xzf libpcap-1.1.1.tar.gz cd libpcap-1.1.1 ./configure make make install ldconfig ``` -------------------------------- ### Install Dependencies and Build Sniffer on FreeBSD Source: https://github.com/voipmonitor/sniffer/blob/master/README_freebsd.md Installs required packages, clones the sniffer repository, and compiles the software. Ensure you have root privileges for package installation. ```bash pkg install -y gmake pkgconf autoconf git libogg rrdtool google-perftools png fftw3 curl libvorbis vorbis-tools lzo2 snappy unixODBC json-c libgcrypt gbutls libssh icu git clone https://github.com/voipmonitor/sniffer.git autoconf ./configure gmake ``` -------------------------------- ### Locate and Link Shared Library Source: https://github.com/voipmonitor/sniffer/blob/master/README_raspbian.md Finds the installed libtcmalloc shared library and creates a symbolic link if it doesn't exist. This is part of the recommended setup for libtcmalloc. ```bash ldconfig -p |grep libtcmalloc_minimal ``` ```bash ln -s libtcmalloc_minimal.so.4.2.2 libtcmalloc_minimal.so ``` -------------------------------- ### Install Dependencies and Compile voipmonitor Source: https://github.com/voipmonitor/sniffer/blob/master/README_piaf.md Installs MySQL development headers, libpcap, and compiles voipmonitor from source. Ensure you have root privileges for some commands. ```bash yum install mysql-devel wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz tar zxvf libpcap-1.1.1.tar.gz cd libpcap-1.1.1 ./configure make make install ldconfig cd .. wget http://downloads.sourceforge.net/project/voipmonitor/2.1/voipmonitor-2.1.tar.gz?r=http%3A%2F%2Fwww.voipmonitor.org%2F&ts=1299123384&use_mirror=surfnet tar zxvf voipmonitor-2.1.tar.gz mv voipmonitor-2.1 voipmonitor cd voipmonitor make make install ``` -------------------------------- ### Configure voipmonitor Database and Run Source: https://github.com/voipmonitor/sniffer/blob/master/README_piaf.md Sets up the voipmonitor database, configures environment variables for shared libraries, and starts the sniffer. Replace 'passw0rd' with your actual MySQL root password. ```bash mysqladmin create –u root voipmonitor –p passw0rd cat cdrtable.sql | mysql voipmonitor –p passw0rd export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib chmod 0777 /usr/local/lib mkdir /var/spool/voipmonitor chmod 777 /var/spool/voipmonitor voipmonitor -i eth0 -SRG -h localhost -b voipmonitor -u root -p passw0rd ``` -------------------------------- ### Build VoIPmonitor from Source Source: https://github.com/voipmonitor/sniffer/blob/master/README_centos.md Checks out the VoIPmonitor source code from SVN, configures the build, and installs it. This process includes setting up the necessary spool directory. ```bash svn co http://svn.code.sf.net/p/voipmonitor/code/trunk voipmonitor-svn cd voipmonitor-svn rm Makefile ./configure make make install mkdir /var/spool/voipmonitor chown apache /var/spool/voipmonitor ``` -------------------------------- ### Install libpcap and zlib with emerge Source: https://github.com/voipmonitor/sniffer/blob/master/README_gentoo.md Use emerge to install the libpcap and zlib libraries, which are required dependencies for voipmonitor. ```bash emerge libpcap zlib ``` -------------------------------- ### Install Debian Packages for VoIPmonitor Sniffer Source: https://github.com/voipmonitor/sniffer/blob/master/README_debian.md Installs essential build tools and development libraries required for compiling the VoIPmonitor sniffer. Ensure these packages are installed before proceeding with the build. ```bash apt-get install build-essential git libmysqlclient-dev libvorbis-dev libpcap-dev unixodbc-dev libsnappy-dev libcurl4-openssl-dev libssh-dev libjson-c-dev librrd-dev liblzo2-dev liblzma-dev libglib2.0-dev libxml2-dev libzstd-dev liblz4-dev ``` -------------------------------- ### Install Required Build Dependencies Source: https://github.com/voipmonitor/sniffer/blob/master/README_raspbian.md Installs essential development tools and libraries needed to compile the VoIPmonitor sniffer. ```bash apt-get install build-essential apt-get install unixodbc-dev libvorbis-dev libsnappy-dev libcurl4-openssl-dev libssh-dev libpng12-dev libfftw3-dev librrd-dev liblzma-dev libgoogle-perftools-dev libgcrypt11-dev libpcap-dev libicu-dev libjson-c-dev libglib2.0-dev libxml2-dev default-libmysqlclient-dev liblzo2-dev gnutls-dev ``` -------------------------------- ### Download, Configure, and Build Snappy Library Source: https://github.com/voipmonitor/sniffer/blob/master/README_centos.md Downloads, extracts, configures, and installs the Snappy compression library. This is a prerequisite for certain functionalities. ```bash wget https://snappy.googlecode.com/files/snappy-1.1.0.tar.gz tar xzf snappy-1.1.0.tar.gz cd snappy-1.1.0 ./configure make make install ``` -------------------------------- ### Configure VoIPmonitor Service Source: https://github.com/voipmonitor/sniffer/blob/master/README_centos.md Copies the main configuration file and the init script for the VoIPmonitor service. It then enables the service to start on boot. ```bash cp config/voipmonitor.conf /etc// cp config/init.d/voipmonitor /etc/init.d/ chkconfig --add voipmonitor chkconfig voipmonitor on ``` -------------------------------- ### Install Optional Debian Packages for VoIPmonitor Sniffer Source: https://github.com/voipmonitor/sniffer/blob/master/README_debian.md Installs additional optional development libraries that may enhance the functionality or performance of the VoIPmonitor sniffer. Install these if specific features are needed. ```bash apt-get install libpng-dev libgcrypt-dev libfftw3-dev libgoogle-perftools-dev gnutls-dev ``` -------------------------------- ### Install MySQL Server Source: https://github.com/voipmonitor/sniffer/blob/master/README_raspbian.md Installs the MySQL server package, which is required if you plan to use a local MySQL server for VoIPmonitor. ```bash apt-get install mysql-server ``` -------------------------------- ### Start VoIPmonitor Sniffer with Configuration File Source: https://github.com/voipmonitor/sniffer/blob/master/README.md This command starts the VoIPmonitor sniffer using a specified configuration file. Ensure the configuration file path is correct. ```bash voipmonitor --config /etc/voipmonitor.conf ``` -------------------------------- ### Install RRDtool on Debian 7 Source: https://github.com/voipmonitor/sniffer/blob/master/README_rrd.md Installs the necessary rrdtool package for RRD graph generation on Debian 7 systems. If compiling VoIPmonitor from source, also install the development headers. ```bash I) For debian 7 based systems: i) apt-get install rrdtool *) if you compiling voipmonitor from sources: apt-get install rrdtool-dev ``` -------------------------------- ### VoIPmonitor Configuration File Example Source: https://github.com/voipmonitor/sniffer/blob/master/README.md This is a sample configuration file for VoIPmonitor. Key settings include the network interface, MySQL database connection details, and options for audio and SIP/RTP recording. ```ini # Network interface to sniff interface = eth0 # MySQL database connection mysqlhost = localhost mysqldb = voipmonitor mysqlusername = voipmonitor mysqlpassword = secret # Enable audio recording audio_recording = yes savesip = yes savertp = yes ``` -------------------------------- ### Install Development Tools and Dependencies on CentOS Source: https://github.com/voipmonitor/sniffer/blob/master/README_centos.md Installs essential development tools and libraries required for building software on CentOS. Ensure your system is updated before running these commands. ```bash yum groupinstall 'Development Tools' yum install subversion unixODBC-devel mysql-devel libogg libogg-devel vorbis-tools libvorbis libvorbis-devel libpcap-devel zlib-devel ``` -------------------------------- ### Compile and Install VoIPmonitor Sniffer from Source Source: https://github.com/voipmonitor/sniffer/blob/master/README_debian.md Clones the sniffer source code from GitHub, navigates into the directory, configures the build, and compiles the software. A warning about `tmpnam` is expected and can be ignored. ```bash cd /usr/src git clone https://github.com/voipmonitor/sniffer.git cd sniffer ./configure make ``` -------------------------------- ### Build VoIPmonitor Sniffer from Source Source: https://github.com/voipmonitor/sniffer/blob/master/README.md This method requires Git, and build tools (like make, gcc). Clone the repository, configure the build, compile, and install the sniffer. ```bash git clone https://github.com/voipmonitor/sniffer.git cd sniffer ./configure make make install ``` -------------------------------- ### Install RRDtool on Red Hat/CentOS Source: https://github.com/voipmonitor/sniffer/blob/master/README_rrd.md Installs the rrdtool package on Red Hat or CentOS systems. For CentOS, ensure RPMForge repositories are enabled. ```bash II) Red Hat i) yum install rrdtool ``` ```bash III) For centOS i)you need rpmForge repositiories downloaded and installed. If you don't have follow instructions from: http://wiki.centos.org/AdditionalResources/Repositories/RPMForge ii)Finally install rrd tools 1) For x86_64 download # yum install rrdtool.x86_64 2) Otherwise # yum install rrdtool.i686 ``` -------------------------------- ### Install Additional Dependencies for CentOS >= 7.4 Source: https://github.com/voipmonitor/sniffer/blob/master/README_centos.md Installs extra development libraries needed for newer CentOS versions (7.4 and above). These packages provide support for features like compression, SSL, and JSON parsing. ```bash yum install libicu-devel snappy-devel libcurl-devel libssh-devel libpng-devel fftw-devel openssl-devel json-c-devel rrdtool-devel glib2-devel libxml2-devel lzo-devel gnutls-devel libgcrypt-devel gperftools-devel ``` -------------------------------- ### Disk I/O Calibration Profile Configuration Source: https://github.com/voipmonitor/sniffer/blob/master/README_disk_io_monitor.md This is an example of the calibration profile configuration file stored in the spool directory. It contains parameters derived from the automatic calibration process. ```ini [calibration] uuid=abc123... device=nvme0n1 filesystem=ext4 spool_path=/var/spool/voipmonitor calibration_time=1706000000 baseline_latency_ms=0.5 knee_latency_ms=2.0 saturation_latency_ms=10.0 knee_throughput_mbs=800.0 max_throughput_mbs=1200.0 baseline_iops=50000 knee_iops=80000 max_iops=120000 ``` -------------------------------- ### Build libpcap for Older CentOS Versions (< 6.3) Source: https://github.com/voipmonitor/sniffer/blob/master/README_centos.md Installs the libpcap library from source for older CentOS systems. This is necessary for network packet capture. ```bash wget http://www.tcpdump.org/release/libpcap-1.3.0.tar.gz tar xzf libpcap-1.1.1.tar.gz cd libpcap* ./configure make make install ``` -------------------------------- ### Generate various graphs using creategraph command Source: https://github.com/voipmonitor/sniffer/blob/master/README_rrd.md Examples of using the 'creategraph' command via telnet to the VoIPmonitor manager to generate different types of performance graphs and save them to files or stdout. ```bash creategraph PS now-2weeks now 600 400 0 0 - /tmp/graph_PS.png creategraph SQLq now-2weeks now 600 400 0 0 - /tmp/graph_SQLq.png creategraph tCPU now-2weeks now 600 400 0 0 - /tmp/graph_tCPU.png creategraph drop now-2weeks now 600 400 0 0 - /tmp/graph_drop.png creategraph speed now-2weeks now 600 400 0 0 - /tmp/graph_speed.png creategraph heap now-2weeks now 600 400 0 0 - /tmp/graph_heap.png creategraph calls now-2weeks now 600 400 0 0 - /tmp/graph_calls.png creategraph tacCPU now-2weeks now 600 400 0 0 - /tmp/graph_tacCPU.png ``` ```bash creategraph mem_usage "31.8.2014 00:00" now 600 400 ``` -------------------------------- ### Configure Web GUI for MS SQL Source: https://github.com/voipmonitor/sniffer/blob/master/README_mssql.md Modify the configuration.php file in your web GUI folder to define the MS SQL connection parameters for the web interface. This requires the php-mssql extension to be installed. ```php define("SQL_DRIVER", "mssql"); define("SQL_CDRTABLE", "cdr"); define("MSSQL_HOST", "192.168.1.101"); define("MSSQL_DB", "voipmonitor"); define("MSSQL_USER", "sa"); define("MSSQL_PASS", "abc123"); ``` -------------------------------- ### Configure ODBC for MS SQL Source: https://github.com/voipmonitor/sniffer/blob/master/README_mssql.md Append or modify the /etc/odbc.ini file to define the connection parameters for the MS SQL database. Ensure the driver path is correct for your freetds installation. ```ini [voipmonitor] Server = 192.168.1.101 Port = 1433 Database = voipmonitor Driver = /usr/lib64/libtdsodbc.so.0 #Note: /usr/lib64/libtdsodbc.so.0 is library contained in package freetds; please specify correct path and filename ``` -------------------------------- ### Syslog Output Format for Disk I/O Metrics Source: https://github.com/voipmonitor/sniffer/blob/master/README_disk_io_monitor.md This is an example of the periodic status line output from the sniffer, showing disk I/O metrics. It includes fields like latency, utilization, capacity, throughput, and IOPS. ```text [283.4/283.4Mb/s] IO[B1.1|L0.7|U45|C75|W125|R10|WI1.2k|RI0.5k] tarQ[0] ``` -------------------------------- ### Copy Default Configuration Files Source: https://github.com/voipmonitor/sniffer/blob/master/README_raspbian.md Copies the default configuration and init script from the build directory to their respective system locations. ```bash cp /usr/src/voipmonitor-git/config/voipmonitor.conf /etc/voipmonitor.conf ``` ```bash cp /usr/src/voipmonitor-git/config/init.d/voipmonitor /etc/init.d/voipmonitor ``` -------------------------------- ### Configure VoIPmonitor Sniffer for MS SQL Source: https://github.com/voipmonitor/sniffer/blob/master/README_mssql.md Update the /etc/voipmonitor.conf file with the MS SQL connection details, including the DSN, username, password, and driver type. ```ini odbsdsn = voipmonitor odbcuser = sa odbcpass = abc123 odbcdriver = mssql sqldriver = odbc ``` -------------------------------- ### creategraph command syntax Source: https://github.com/voipmonitor/sniffer/blob/master/README_rrd.md Defines the syntax and arguments for the 'creategraph' command, including graph types, time formats, dimensions, and optional parameters for slope, icon mode, color, and destination file. ```text Syntax: creategraph graph_type linuxTS_from linuxTS_to size_x_pixels size_y_pixels [ slope-mode [ icon-mode [ color [ dstfile ]]]] Arguments: graphType is one of the following: PS PSC PSS PSSM PSSR PSR PSA SQLq SQLf tCPU drop speed heap calls tacCPU memusage loadavg linuxTS_from linuxTS_to both arguments are at-style time format for example from Aug-12-2014 to now: "12.8.2014 22:00" now for example from 2 weeks ago, to 1 week ago: "now-2weeks" "now-1week" size_x_pixels size_y_pixels Determines final resolution in pixels of graph image. Minimal setting is: 400 200 Beware: If you choose lower resolution than 400 for x-axis or 200 for y-axis resulting graph will be treated as icon. (read bellow) [slope-mode] Put 1, if you want to have slope curves. Default is 0 [icon-mode] Put 1, if you want only fillings of graph (no descriptions no axis no lines only fill). Default 0 [color] Define color of outgoing graph. Use '-' sign to let rrd choose color for you [dstfile] Specifies file to which you want to save the graph. Default is sending image to stdout. If you want to send image on stdout, skip this argument. ``` -------------------------------- ### C++ Structure for Disk I/O Calibration Profile Source: https://github.com/voipmonitor/sniffer/blob/master/README_disk_io_monitor.md Defines the structure used to hold calibration profile data, including filesystem UUID, device name, and latency/throughput thresholds. ```cpp struct sCalibrationProfile { std::string uuid; // Filesystem UUID std::string device; // Block device (nvme0n1, sda, etc.) double baseline_latency_ms; // Latency at minimal load double knee_throughput_mbs; // Throughput where latency increases // ... more fields }; ``` -------------------------------- ### VoIPmonitor Sniffer Architecture Diagram Source: https://github.com/voipmonitor/sniffer/blob/master/README.md Visual representation of the VoIPmonitor Sniffer's architecture, illustrating the flow of network traffic through parsing, decoding, analysis, and storage components, connecting to databases and the web GUI. ```text ┌─────────────────────────────────────────────────────────────────────┐ │ Network Traffic │ │ (SPAN/RSPAN/ERSPAN/TAP/SBC Mirroring) │ └───────────────────────────────┬─────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────────┐ │ VoIPmonitor Sniffer (GPL) │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │ SIP Parser │ │ RTP Decoder │ │ Quality │ │ Audio │ │ │ │ │ │ │ │ Analysis │ │ Recording │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │ └───────────────────────────────┬─────────────────────────────────────┘ │ ┌───────────────────┼───────────────────┐ ▼ ▼ ▼ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │ MySQL/MariaDB │ │ PCAP Storage │ │ Audio Files │ │ (CDRs) │ │ (SIP/RTP) │ │ (WAV/OGG) │ └───────────────┘ └───────────────┘ └───────────────┘ │ │ │ └───────────────────┼───────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────────┐ │ VoIPmonitor WEB GUI (Commercial) │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │ Dashboards │ │ Analytics │ │ Alerting │ │ Billing │ │ │ │ & Reports │ │ & OLAP │ │ & Fraud │ │ Engine │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │ └─────────────────────────────────────────────────────────────────────┘ ``` -------------------------------- ### C++ Structure for Disk I/O Metrics Source: https://github.com/voipmonitor/sniffer/blob/master/README_disk_io_monitor.md Defines the structure used to store current I/O metrics, including write throughput, capacity percentage, latency, utilization, and saturation state. ```cpp struct sIOMetrics { double write_throughput_mbs; // Current write MB/s double capacity_pct; // % of knee throughput double write_latency_ms; // Current latency double utilization_pct; // % time disk busy eSaturationState state; // OK, WARNING, DISK_SATURATED // ... more fields }; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.