Watch, Read, Listen
-
Apache Tomcat – Get logs directly cleaned with rotation
Tomcat allows you to rotate easily your log files with AccessLogValve but it can be more difficult to get cleaning in logs directories automatically. For that, you can easily use some smart find commands combined with actions: Get logs older than 3 days compressed so they can be smaller but still accessible find /var/log/tomcat/ -mtime…
-
Generate a random file with specific size
It’s possible to easily generate a random file with specific size filled differently depending on the needs: Fill a 200MB file with zeroes dd if=/dev/zero of=/tmp/file.out bs=1024KB count=200 Fill a 200MB file with random values (longer than zeroes – depending on processor) dd if=/dev/random of=/tmp/file2.out bs=1024KB count=200
-
Escape sequences for SSH (when you’re stuck)
You can get stuck with your ssh session when your network is changing or when there’s a network disruption. You will face a lock leading to the unability to stop your session, even by doing a CTRL-C. That’s why there’s some escape sequences you can use in that case (especially the first one when you’re…
-
Renew a GPG key when you get “GPG error – KEYEXPIRED”
Getting this error when trying to update packages on your linux distro using apt? $apt-get update W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.puppetlabs.com jessie Release: The following signatures were invalid: KEYEXPIRED 1468001658 This just means that the GPG…
-
Send an UDP packet with NetCat
It can be needed to test an UDP connection with a server to ensure that connectivity is working and double check the data received. Let’s take a simple example with a remote logstash server: – Server mylogstash.mydomain.local – Listening on port 5000 On emitter side, we are sending an UDP packet simulating a log line…
-
Find and identify where inodes are used
Your monitoring system is claiming that your server is running out of free inodes but your disks are not full at all? Maybe you just need to check your filesystem usage and how many files are being used at the same time… Here are some tips to check and identify the inodes being used. First…
-
Calculate Database/Table size in MySQL
MySQL is an open-source relational database management system (RDBMS) available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. Thanks to some few functions, it’s possible to retrieve important information about database size and/or table size for a MySQL instance. Size for all databases SELECT table_schema…
-
Skype group chat not working on linux
With Linux version for Skype, it can happen that group conversation are not working as expected (conversations do not start, or updates are not working, or group members do not appear, …). You can check MSNP version you are using by typing this command in any conversation chat: /dumpmsnp If you are getting this message…
-
Open bash session into a docker container
Once a docker container is started, it’s always hard to get access into and see what’s happening inside. As a workaround, the easiest way to understand what’s happening in a container is to get a CLI on it and investigate. Since version 1.3, you can easily open a bash session into a running container by…
-
openssl/pyOpenSSL – “SSL23_GET_SERVER_HELLO:tlsv1 alert internal error”
You’re getting this annoying error message again and again when trying to fetch certificate and/or establish a connection to your website using openssl: 139647967614624:error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error:s23_clnt.c:769: This issue is well known in several openssl versions, and a bug has been addressed for Ubuntu repositories: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1475228 For now, there’s a simple workaround that works…