Sniffer upgrade: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
= upgrade from web GUI =
= Upgrade or Downgrade from web GUI =
Go to settings -> sensors and do the upgrade from there.  
Go to settings -> sensors and do the upgrade from there.
Only running sniffers can be downgraded or upgraded via GUI. If you need to do downgrade, click on (+) for details, and then click on Blue UPGRADE button, dropbox will appear with versions available for downgrade/upgrade.


= upgrade to the latest versions (64bit)=


#this is example for 9.4beta23
wget download.voipmonitor.org/senzor/download/9.4beta23/voipmonitor.gz.64 (or 32 if you have 32bit)
mv voipmonitor.gz.64 voipmonitor.gz
gunzip voipmonitor.gz
chmod +x voipmonitor
killall -9 voipmonitor
mv voipmonitor /usr/local/sbin/
service voipmonitor start


= Upgrade from 5.1 =
= Manual upgrade or downgrade =
Since version 5.1 database is upgraded and populated automatically during first run (if mysql credential is set properly – CREATE and ALTER is needed).


= Upgrade from 5.0 to 5.1 =
Upgrading database from 5.0 do not changes cdr table and thus the upgrade is instant. Here is the procedure
Download voipmonitor sources and untar
wget https://sourceforge.net/projects/voipmonitor/files/5.1/voipmonitor-5.1-src.tar.gz/download
Go to voipmonitor source directory and run this command
cat cdrtable.sql.5.0-5.1 | mysql voipmonitor
Where voipmonitor is name of the database. If you have password protected database, run
cat cdrtable.sql.5.0-5.1 | mysql -p voipmonitor


== Stop running sniffer service ==


= Upgrade from 4.2 to 5.0 =
/etc/init.d/voipmonitor stop
# In case that service won't stop, press CTRL+C and use KILL signal to terminate the process with a force:
kill -9 `pgrep voipmonitor`
# In case that multiple instances of voipmonitor are running there, use last command multiple-times.


Database schema has changed in version 4 in way that it needs to alter table at least two times which is so inefficient that we had to write PHP script which transforms old CDR into new structure. On SATA disk upgrading 12 milions CDR takes ~24 hours which means that the table is also locked and no CDR is possible to write during the upgrade procedure. The procedure is:
== Choose a package version on a sourceforge site ==
#create new database
mysqladmin create voipmonitor5
cat cdrtable.sql | mysql voipmonitor5
cd voipmonitor/scripts


#edit mysql_copy_4.2to5.0.php and set appropriate constants:  
Find voipmonitor*.tar.gz file of your choice at site https://sourceforge.net/projects/voipmonitor/files/ and use the link for wget command in step by step [https://wiki.voipmonitor.org/doc/index.php?title=Sniffer_installation&action=submit#Step_by_step_for_64bit_linux_procedure How To Install Sniffer]
define("HOST", "localhost");
define("USER", "root");
define("PASS", "");
define("SOURCE_DB", "voipmonitor");
define("DEST_DB", "voipmonitor5");
#SOURCE_DB is the old database name, DEST_DB is the new database.


*Run the script php  mysql_copy_4.2to5.0.php
=== Example of wget command for version 20.4.4 with ss7(wireshark) module ===
The script can run for very long time so its recommended to run it from “screen” (apt-get install screen | yum install screen). The speed of conversion depends a lot on two factors - if binlog is enabled it is better to disable it in /etc/mysql/my.cn (comment out log_bin) in /etc/mysql/my.cnf set innodb_flush_log_at_trx_commit = 0 (and after you finish the upgrade, set it to = 2 (more secure)
  wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-wireshark-amd64-20.4.4-static.tar.gz --content-disposition --no-check-certificate
If disk is raid5 or slow SATA disk, insertion would be very slow. If the disk with mysql is shared with /var/spool/voipmonitor and voipmonitor sniffer is running - In this case stop mysql, mv /var/lib/mysql /mnt/dedicated/; mkdir /var/lib/mysql; chown mysql /var/lib/mysql; mount -o bind /mnt/dedicated/mysql /var/lib/mysql – and start mysql. After you finish export you can move all files back (do not forget to keep right permission on the files - user mysql).
 
 
== Download just a binary file directly from voipmonitor ==
 
Beware that only few latest versions are available
 
=== Example link for 32bit version of 20.4.4 sniffer binary ===
 
http://download.voipmonitor.org/senzor/download/20.4.4/voipmonitor.gz.32
 
=== Example link for 64bit version of 20.4.4 sniffer binary ===
 
http://download.voipmonitor.org/senzor/download/20.4.4/voipmonitor.gz.64
 
=== Example link for ArmV6(RPI) and SS7(wireshark) sniffer bianaries ===
 
Curently those binaries are not available directly - use steps for installing packages from a [https://wiki.voipmonitor.org/doc/index.php?title=Sniffer_upgrade&action=submit#Choose_package_version_on_a_sourceforge_site sourceforge] above to download whole package and steps to install sniffer.
 
=== step by step for upgrade using downloaded binary file for 64bit ===
#You can backup previous version of a sniffer
mv /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor-backup
#Download gziped binary, rename it and unpack.
  wget http://download.voipmonitor.org/senzor/download/20.4.4/voipmonitor.gz.64 --content-disposition --no-check-certificate

Revision as of 12:27, 14 September 2017

Upgrade or Downgrade from web GUI

Go to settings -> sensors and do the upgrade from there. Only running sniffers can be downgraded or upgraded via GUI. If you need to do downgrade, click on (+) for details, and then click on Blue UPGRADE button, dropbox will appear with versions available for downgrade/upgrade.


Manual upgrade or downgrade

Stop running sniffer service

/etc/init.d/voipmonitor stop
# In case that service won't stop, press CTRL+C and use KILL signal to terminate the process with a force:
kill -9 `pgrep voipmonitor`
# In case that multiple instances of voipmonitor are running there, use last command multiple-times.

Choose a package version on a sourceforge site

Find voipmonitor*.tar.gz file of your choice at site https://sourceforge.net/projects/voipmonitor/files/ and use the link for wget command in step by step How To Install Sniffer

Example of wget command for version 20.4.4 with ss7(wireshark) module

wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-wireshark-amd64-20.4.4-static.tar.gz --content-disposition --no-check-certificate


Download just a binary file directly from voipmonitor

Beware that only few latest versions are available

Example link for 32bit version of 20.4.4 sniffer binary

http://download.voipmonitor.org/senzor/download/20.4.4/voipmonitor.gz.32

Example link for 64bit version of 20.4.4 sniffer binary

http://download.voipmonitor.org/senzor/download/20.4.4/voipmonitor.gz.64

Example link for ArmV6(RPI) and SS7(wireshark) sniffer bianaries

Curently those binaries are not available directly - use steps for installing packages from a sourceforge above to download whole package and steps to install sniffer.

step by step for upgrade using downloaded binary file for 64bit

#You can backup previous version of a sniffer
mv /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor-backup
#Download gziped binary, rename it and unpack.
wget http://download.voipmonitor.org/senzor/download/20.4.4/voipmonitor.gz.64 --content-disposition --no-check-certificate