Archives pour 05/2023

Basic munin plugins for Snort

31/05/2023 Comments off

munin pluginsHere are some basic munin plugins for snort using perfmon (Enable preprocessor perfmonitor in snort.conf)
The snort.conf entry should look something like:

preprocessor perfmonitor: time 300 file /your/path/to/snort.stats pktcnt 5000

(Read the snort docs for more info on performance issues etc.)

Drop Rate:

Pattern Matching:

Traffic speed:


Avg KBytes/pkt:

Avg Pkts/sec:

Edit any one of them, to graph what you want from perfmon output. It should be easy!

And now I will test them myself!

Here is a picture to give you an idea on how the graphs looks:


Linux Command: Show Linux Version

31/05/2023 Comments off

Source: nixCraft

What command I need to type to display Linux kernel version and other information such as Linux distribution name? How do I check Linux kernel version number?

You need to use the following two commands:

[a] uname - Print kernel and system information.
[b] lsb_release - Print distribution-specific information.
[c] /proc/version file - Print running kernel information.

How to check linux kernel version number?

Open a shell prompt (or a terminal) and type the following command to see your current Linux kernel version:

$ uname -r

Sample outputs:


Or type the following command:

$ uname -mrs

Sample outputs:

Linux 2.6.32-23-generic-pae i686

To print all information, enter:

$ uname -a

Sample outputs:

Linux vivek-laptop 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/Linux


  • 2.6.32-23 – Linux kernel version number
  • pae – pae kernel type indicate that I’m accssing more than 4GB ram using 32 bit kernel.
  • SMP – Kernel that supports multi core and multiple cpus.

Lire la suite…

Categories: Système Tags: , , ,

Thunderbird/Change account order

30/05/2023 Comments off

To change the order of the accounts in Thunderbird simply edit

~/.thunderbird/<your profile>/prefs.js in GNU/Linux,
C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js in Microsoft Windows XP,

Lire la suite…

Categories: Logiciel Tags: , ,

MySQL show users – how to show the users in a MySQL database

30/05/2023 Comments off


To show/list the users in a MySQL database, first log into your MySQL server as an administrative user, then run this MySQL query:

select * from mysql.user;

This MySQL query shows a large listing of MySQL user information, including user permission information, so you may want to trim down some of the fields to display. You can get a listing of the fields in the mysql.user table by running this command:

desc mysql.user;

Lire la suite…

Categories: Bases de données Tags: ,

MySQL – Chargement d’un fichier texte dans une table

29/05/2023 Comments off

Pour charger une fichier texte défini comme suit :

$ tail /home/user1/test.txt

Dans une table définie comme suit :

CREATE TABLE chargertest (
                cle_prim int(11) NOT NULL auto_increment,
                nom varchar(20),
                x integer,
                y integer,
                z timestamp(14),
                Constraint pk_chargertest PRIMARY KEY  (cle_prim)

A noter que le champ ‘z’ n’est pas défini au niveau du fichier texte et que le séparateur utilisé est ‘,’.

mysql> load data infile '/home/user1/test.txt' into table chargertest fields terminated by ',' (nom,x,y);


Categories: Bases de données Tags: ,