Virtualbox: can’t remove / attach new hard disk
When i try to remove a disk in Virtualbox with this command: I got the following error And the fix is:Read More →
When i try to remove a disk in Virtualbox with this command: I got the following error And the fix is:Read More →
rrdcached is a daemon that receives updates to existing RRD files, accumulates them and, if enough have been received or a defined time has passed, writes the updates to the RRD file. A flush command may be used to force writing of values to disk, so that graphing facilities and similar can work with up-to-date data. rrdcached uses the line protocol to communicate with client. When we start rrdcached , it will listen on port 42217 and create a socket file. We can telnet to port 42217 or use ncat to create a connection to socket file. telnet localhost 42217 or nc -U /var/run/rrdcached/rrdcached.sock AfterRead More →
When we add new data: # vi /etc/apt/sources.list … deb http://deb.debian.org/debian stretch main contrib non-free deb-src http://deb.debian.org/debian stretch main contrib non-free we got some errors below: # apt-get update Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease Get:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Fetched 172 kB in 2s (73.3 kB/s) Reading package lists… Done root@netsgn:~/soft# nano /etc/apt/sources.list root@netsgn:~/soft# apt-get update Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease Get:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:4 https://packagecloud.io/grafana/stable/debian stretch InRelease [23.2 kB] Err:4 https://packagecloud.io/grafana/stable/debian stretch InRelease The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 37BBEE3F7AD95B3F Fix: #Read More →
rrdtool dump filename.rrd rrdtool info filename.rrd rrdtool graph /dev/null -s 3600 DEF:ierr=filename.rrd:ds1:AVERAGE VDEF:ioct_a=ierr,AVERAGE PRINT:ierr:%lf this command will get the avg value of ds1 (ds1 is the dataset – you can see it in rrdtool info ) , assign it to variable ierr and print out #3600 => one hourRead More →
Create a service: sudo vi /etc/systemd/system/rc-local.service Add your code there: [Unit] Description=/etc/rc.local Compatibility ConditionPathExists=/etc/rc.local [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target Create and make sure /etc/rc.local is executable and add this code inside it: sudo chmod +x /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will “exit 0” on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. exit 0 Enable the service: sudoRead More →
2 sites vpn works well, they can see each other. but i want to send all internet from my remote sites to my strongswan including the internet. This need to get done on strongswan side: 10.0.3.0/24 is the remote subnet iptables -t nat -A POSTROUTING -s 10.0.3.0/24 -o eth0 -j MASQUERADERead More →
minicom -s (this is to configure the terminal) to exit minicom Press Ctrl – A , select Z , select XRead More →
When you tried to stop Nagios to monitor some services from web interfaces – you see the message below: Sorry, but Nagios is currently not checking for external commands, so your command will not be committed! This is because we haven’t enable this feature in our configuration, it’s easy to fix. Open your nagios config file , /etc/nagios3/nagios.cfg Look for this line: check_external_commands=0 change it to check_external_commands=1 and reload nagios /etc/init.d/nagios3 restart You might receive this error: Error: Could not stat() command file ‘/var/lib/nagios3/rw/nagios.cmd’!. The fix is # /etc/init.d/nagios3 stop Stopping nagios3 monitoring daemon: nagios3Waiting for nagios3 daemon to die… . # dpkg-statoverride –updateRead More →
it’s because the new line difference between Unix and windows , the easiest fix it run this command dos2unix filename Read More →
I just found out that i could not access my wordpress today, i checked the server, everything looked good. i restarted the server, it’s still slow, there is no error. I decided to do a debug using the following command: cd /www/myswebsite.com/httpdocs/ strace php index.php I see my script stopped at sendmmsg(6, {{{msg_name(0)=NULL, msg_iov(1)=[{“-\265\1\0\0\1\0\0\0\0\0\0\24tech-banker-service”…, 42}], msg_controllen=0, msg_flags=MSG_DONTROUTE|MSG_DONTWAIT|MSG_FIN|MSG_SYN|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_FASTOPEN|0x6a80010}, 42}, {{msg_name(0)=NULL, msg_iov(1)=[{“\207E\1\0\0\1\0\0\0\0\0\0\24tech-banker-service”…, 42}], msg_controllen=0, msg_flags=MSG_OOB|MSG_DONTROUTE|MSG_CTRUNC|0x10}, 42}}, 2, MSG_NOSIGNAL) = 2 poll([{fd=6, events=POLLIN}], 1, 5000) = 1 ([{fd=6, revents=POLLIN}]) ioctl(6, FIONREAD, [58]) = 0 recvfrom(6, “-\265\201\200\0\1\0\1\0\0\0\0\24tech-banker-service”…, 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(“213.133.99.99”)}, [16]) = 58 poll([{fd=6, events=POLLIN}], 1, 4999) = 1 ([{fd=6, revents=POLLIN}]) ioctl(6, FIONREAD, [135]) = 0 recvfrom(6,Read More →