By using is isinstance(var, type) function we can check a given value/variable is integer or not. isinstance will either written True or False.
Here is and an example:
>>> isinstance(10, int)
>>> isinstance(var_a, int)
>>> isinstance('a', int)
To check if variable is a number use following example:
To get epoch time stamp in Python we need to time.time() function.
time.time() will returns a float value with double precision counting seconds since epoch and to convert it to milliseconds multiply it with 1000.
With below example code I will show how to get epoch time stamp in milliseconds:
>>> import time
>>> int(time.time() * 1000)
In above example int(time.time() * 1000) will return epoch time in milliseconds.
When you initially install Linux, you specify the machine's timezone. After the install, you can manually change the timezone. The following procedure applies to Debian and Ubuntu systems. Before you change the timezone, let's find out what timezone your system is currently in. $ dateTue Dec 2 13:53:11 PST 2014
If you use rsyslog's devel packages on your system, you will receive errors soon. Be sure to read the complete posting to avoid trouble!As part of rsyslog's new release schedule and version naming, devel releases will no longer be named according to the "normal" numbering scheme. This also means that the previous "devel" branches will disappear, as git master branch now is the always-current devel version.
With today's release of rsyslog 8.6.0, we start a new release schedule and versioning scheme. In a nutshell, we will be doing stable releases every six weeks now, and devel releases will be distributed via git exclusively.
Today I saw an awesome video of a presentation by Glenn O’Donnell. In his presentation, Glenn states that it’s not about technology, it’s about services. Service design is modular with a logical structure. Approach it as a system and try to improve it as a whole, not just tiny pieces of it. To do that, … … Continue reading →
For historical reasons, rsyslog offers a number of command line options which are actually configuration settings. These stem back to the days of the original syslogd, where the conf file was just a routing table and "all" other configuration was done via the command line. Some of them (e.g. -r to enable listening to the standard UDP port) have already been removed quite a while ago. Now, we are very serious about removing the rest of them.