zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Create Nagios Icons

December 2, 2010 by Igor Drobot Leave a Comment

Nagios

If you ever tried to make Nagios Status-Map a little nicer by adding some dependencies and some pretty icons, you have probably came across some little collections/packs of icons at NagiosExchange.
But if you need a special one, you must do it by yourself.
And you probably noticed that you need images with .gd2 extension
Here is how to convert a PNG image into .gd2 (GD Graphics Library format)

Solution one:

1
aptitude install netpbm

aptitude install netpbm

1
pngtopnm example.png | pnmtopng -transparent =rgb:00/00/00 2>/dev/null | pngtogd2 /proc/self/fd/0 example.gd2 0 1

pngtopnm example.png | pnmtopng -transparent =rgb:00/00/00 2>/dev/null | pngtogd2 /proc/self/fd/0 example.gd2 0 1

Solution two:

1
aptitude install libgd-tools

aptitude install libgd-tools

1
pngtogd2 phone.png phone.gd2 0

pngtogd2 phone.png phone.gd2 0

Filed Under: Bash, Linux, Monitoring Tagged With: Monitoring, Nagios, Nagios convert gd2, Nagios3

Understanding FTP using commands

November 29, 2010 by Igor Drobot Leave a Comment

FTP and SMTP are simple text based protocols, I show you how to get some files without a graphical FTP-Client.

Connect with Telnet:

1
2
3
4
5
6
id@acer:~$ telnet debianuser.org 21
Connected to debianuser.org.
USER anonymous
PASS anonymous
PASV
RETR deli-0.8.0-core.iso

id@acer:~$ telnet debianuser.org 21 Connected to debianuser.org. USER anonymous PASS anonymous PASV RETR deli-0.8.0-core.iso

[Read more…]

Filed Under: Bash, FTP, Linux Tagged With: command line ftp, FTP

Make your linux speaking

November 28, 2010 by Igor Drobot Leave a Comment

Speaker

1
echo 'you are a loser' | festival --tts

echo 'you are a loser' | festival --tts

1
for count in $(seq 1 10) ; do espeak "Go Away" ; done

for count in $(seq 1 10) ; do espeak "Go Away" ; done

Make speaker louder:

1
2
3
4
amixer -c 0 sset Master,0 100%;
amixer set Master 100%
# or
amixer set PCM 100%

amixer -c 0 sset Master,0 100%; amixer set Master 100% # or amixer set PCM 100%

Another funny things:

1
2
export DISPLAY=:0
xmessage 'YOU ARE BEING WATCHED. MUHAHAHAHahaha'

export DISPLAY=:0 xmessage 'YOU ARE BEING WATCHED. MUHAHAHAHahaha'

Filed Under: Bash, Fun, Linux Tagged With: alsamixer, espeak, Fun

PHP Security

November 28, 2010 by Igor Drobot Leave a Comment

PHP

PHP reveals its presence on the server in a variety of ways: It may send an HTTP header (X-Powered-By: PHP), or append its name and version to Apache’s signature. In addition, there are easter egg URLs that return the PHP logo or some PHP authors, one of them is:
http://www.host.com/index.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000

Obviously there is no reason to let end users know about the server’s PHP version. Luckily, there is a switch in php.ini that will disable all of the above:

1
expose_php = Off

expose_php = Off

Filed Under: Linux Tagged With: PHP, PHP Security, Webserver Security

MySQL: Show processlist every second

November 28, 2010 by Igor Drobot 6 Comments

MySQL-Logo

1
mysqladmin -u root -p -i 1 processlist

mysqladmin -u root -p -i 1 processlist

-u username
-p you will be promted for a password
-i 1 interval one second

Output will see like this one:

1
2
3
4
5
6
7
8
9
+--------+------+-------------------+-----+---------+------+-------+------------------+
| Id     | User | Host              | db  | Command | Time | State | Info             |
+--------+------+-------------------+-----+---------+------+-------+------------------+
| 424111 | db4  | 192.168.2.1:58431 | db4 | Sleep   | 15   |       |                  |
| 424195 | db4  | 192.168.2.1:50531 | db4 | Sleep   | 1    |       |                  |
| 424483 | db3  | 192.168.2.1:41503 | db3 | Sleep   | 464  |       |                  |
| 424490 | db3  | 192.168.2.1:41513 | db3 | Sleep   | 443  |       |                  |
| 424551 | root | localhost         |     | Query   | 0    |       | show processlist |
+--------+------+-------------------+-----+---------+------+-------+------------------+

+--------+------+-------------------+-----+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +--------+------+-------------------+-----+---------+------+-------+------------------+ | 424111 | db4 | 192.168.2.1:58431 | db4 | Sleep | 15 | | | | 424195 | db4 | 192.168.2.1:50531 | db4 | Sleep | 1 | | | | 424483 | db3 | 192.168.2.1:41503 | db3 | Sleep | 464 | | | | 424490 | db3 | 192.168.2.1:41513 | db3 | Sleep | 443 | | | | 424551 | root | localhost | | Query | 0 | | show processlist | +--------+------+-------------------+-----+---------+------+-------+------------------+

Filed Under: MySQL Tagged With: Database, MySQL, Process List

  • « Previous Page
  • 1
  • …
  • 48
  • 49
  • 50
  • 51
  • 52
  • …
  • 62
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok