Using Fujitsu scansnap ix500 in ubuntu 16.04

One way to use Fujitsu scansnap ix500 scanner in ubuntu 16.04 is thru virtualbox using windows 7.

Virtualbox needs to detect the usb.
Unable to view/connect usb devices to a virtualbox guest from ubuntu host
Add your user to the vboxuser group.
$ sudo usermod -a -G vboxusers $USER

Plug scanner usb into a usb 2 and NOT usb 3 port or you will get an error “failed to create a proxy device for the USB device. (Error: VERR_PDM_NO_USB_PORTS)” because virtualbox may not support usb 3.

Enable usb 2 controller

Inside virtualbox
downloaded the installer
http://www.fujitsu.com/global/support/products/computing/peripheral/scanners/scansnap/software/ix500w-installer.html

Run installer

Enable ix500 usb

and finish the installer

Mysql enable error logging

Was attempting to get the mysql error_log to work. The issue was that skip_log_error was being passed as mysqld param.

Using mariadb

# Is error_log set
$ cat /etc/mysql/mariadb.conf.d/50-server.cnf | grep log_error

[mysqld]
log_error = /var/log/mysql/error.log

# Is skip_log_error removed or commented out
$ cat /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf | grep skip_log_error

[mysqld_safe]
#skip_log_error

# You may already have mysqld running with skip-log-error param which will prevent error_log from working
$ ps aux | grep skip-log-error

mysql    29703  0.0  1.4 662768 168708 ?       Sl   May01   0:36 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306

http://x-v.it/09i2ls

# stop mysqld by killing process
$ kill 29703

# restart mysql
$ sudo /etc/init.d/mysql restart

# view log variables to determine if working
$ mysql -uUsername -pPassword -se "SHOW VARIABLES" | grep -e log_error -e general_log -e slow_query_log
mysql some log variables

Mysql Error: too many open files

# error: ERROR 1018 (HY000): Can’t read dir of ‘.’ (errno: 24)

# Super user
$ sudo su

# See what mysql files are open
$ lsof -u mysql

# Count how many mysql files are open
$ lsof -u mysql | wc -l

# close mysql files
$ kill -9 `lsof -t -u mysql`

# sources
http://i-learnings.blogspot.com.br/2012/11/error-1018-hy000-cant-read-dir-of-errno.html
http://www.webhostingtalk.com/showthread.php?t=1138305

SNMP Getting Started

# install
sudo apt-get install snmp snmpd snmp-mibs-downloader

# configuration
# server
$ sudo nano /etc/snmp/snmpd.conf

rocommunity VegetaRocks
syslocation Vegeta planet 
sysContact Vegeta <vegeta@dbz.com>;

# restart snmpd
$ sudo /etc/init.d/snmpd restart

# Test. On client
$ snmpwalk -v1 -c VegetaRocks 192.168.0.13
$ snmpget -v1 -c VegetaRocks 192.168.0.13 1.3.6.1.4.1.2021.4.5.0

# example of traffic in wireshark
snmp traffic wireshar

# list of SNMP OID
http://www.debianadmin.com/linux-snmp-oids-for-cpumemory-and-disk-statistics.html

# sources

Zabbix installation and setup

https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages/repository_installation#installing_repository_configuration_package2

Ubuntu 16.04 LTS (xenial):

$ wget http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.0-1+xenial_all.deb
$ dpkg -i zabbix-release_3.0-1+xenial_all.deb
$ apt-get update
$ sudo apt-get install zabbix-agent zabbix-server-mysql zabbix-frontend-php snmpd php5.6-mysql php5.6-curl
$ sudo nano /etc/php/5.6/apache2/php.ini

...
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Sao_Paulo
....


$ sudo /etc/init.d/apache2 restart

php info date

Determine what port zabbix listening to. Should be either or all 10050 and 10051. One for agent another for server.
$ sudo netstat -tlnp | grep zabbix
zabbix port listening

Url:
http://localhost/zabbix

Default Username: Admin
Default Password: zabbix

Error Solution: The frontend does not match Zabbix database
zabbix database installation error

You should first populate the database with the sql file provided in /usr/share/doc/zabbix-server-mysql/create.sql

Depending on the size allowed in phpmyadmin its best to import thru the command line. Also this allows to edit the file if any errors (possible 1709)
$ mysql -u root -p zabbix < create.sql

Configure port
If you have the incorrect port set you will get this error
Zabbix server is running
To view the zabbix port (you may need to start zabbix)
$ sudo /etc/init.d/zabbix-agent restart
$ sudo netstat -tlnp | grep zabbix
To change web port
$ sudo nano /etc/zabbix/web/zabbix.conf.php

$ZBX_SERVER      = '192.168.0.13';
$ZBX_SERVER_PORT = '10050';
$ZBX_SERVER_NAME = '';

To change agent port
$ sudo nano /etc/zabbix/zabbix_agentd.conf

### Option: ListenPort
#	Agent will listen on this port for connections from the server.
#
# Mandatory: no
# Range: 1024-32767
# Default:
ListenPort=10050

If you want reinstall zabbix. To get the installation screen
delete /etc/zabbix/web/zabbix.conf.php
or
go to http://localhost/zabbix/setup.php

# comment out the line 'mibs'
$ sudo nano /etc/snmp/snmp.conf

# As the snmp packages come without MIB files due to license reasons, loading
# of MIBs is disabled by default. If you added the MIBs you can reenable
# loading them by commenting out the following line.
#mibs :

# error log location
/var/log/zabbix/

possible errors

server error:
[Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
solution:
mysql>grant all privileges on zabbix.* to zabbix@localhost identified by 'abc123'
$ sudo nano file:/etc/zabbix/zabbix_server.conf

### Option: DBPassword
#	Database password. Ignored for SQLite.
#	Comment this line if no password is used.
#
# Mandatory: no
# Default:
DBPassword=abc123

agent error:
$ tail -f zabbix_agentd.log
failed to accept an incoming connection: connection from "192.168.0.13" rejected, allowed hosts: "127.0.0.1"
solution:
zabbix_agentd.conf 'Server=...' need to match /etc/zabbix/web/zabbix.conf.php '$ZBX_SERVER'
$ sudo nano /etc/zabbix/zabbix_agentd.conf
add 192.168.0.13

 ...
Server=127.0.0.1,192.168.0.13
....
ServerActive=127.0.0.1,192.168.0.13
...

$ sudo /etc/init.d/zabbix-agent restart

sources

http://www.cbt4all.com/2015/01/zabbix-for-beginners-01-installing.html

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-zabbix-to-securely-monitor-remote-servers-on-centos-7

Virtual box Increase disk size

http://trivialproof.blogspot.com.br/2011/01/resizing-virtualbox-virtual-hard-disk.html#expand_partition_on_new_vdi
https://www.howtogeek.com/124622/how-to-enlarge-a-virtual-machines-disk-in-virtualbox-or-vmware/

command example
$ VBoxManage modifyhd /home/user/VirtualBox\ VMs/windows7/windows7.vdi --resize 50000

I had an issue where new memory was not showing up in GParted GUI to be allocated. I cloned the virtual drive and use that one instead and it worked