Linux Admin Steps Into Management

Linux Admin Steps Into Management -

Postfix queue management – list, debug and clean

Postfix mail server

 

Pstfix mail server and acomulate a queue of stuck emails, 
we monitor them via Nagios and sometime get alerts similar to this one,
there are some methods to take care of this queue:

 

msg_q = 17 warn=10 crit=20
WARNING: mailq is 17 (threshold w = 10)

log into the mail server and use the list command to see the mail queue:

mailq

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
AAE603481BD 3471 Thu Oct 18 14:44:30  user@domain.com
(connect to outside.com[xxx.xxx.xxx.xxx]: Connection timed out)
user2@outside.com


the Q-id number is the id for the mail , you can read the mail to understnad what it is about and why its stuck with:

postcat -q AAE603481BD

you can delete it with:

postsuper -d AAE603481BD 

 

useful bash loop to delete all mails from do-not-reply@domain.com:

for i in $(mailq | grep -B1 'do-not-reply@domain.com'| grep '^[A-Z,0-9]'| awk '{print $1}')
do 
postsuper -d $i
done

 

 

Technorati Tags: , ,

Finally a Linux jmx query tool that works out of the box!

I've tried many many jmx query tools from the command line, 
windows has the jconsole tool which is a part of the Java binaries pack, and works fine, 
but it is not a command line tool – it has a nice GUI. 

this command line jar works like a charm, 
displays all the beans it finds, and allows you to invoke them , 

take a look at :

http://crawler.archive.org/cmdline-jmxclient/

only the cmdline-jmxclient-0.10.3.jar files is available for some reason, 
searches in google didnt find the newer file at all. 

than you run it with :

java -jar cmdline-jmxclient.jar – SERVER:PORT

to get a listing of all the available beens.

more samples are available on the link above. 

works like a charm!

 

Technorati Tags: , ,

Exporting MediaWiki sites to Google sites

In the last post I’ve talked about moving files from SharePoint to Google Site,

what about a Mediawiki site?
how to export it and upload it?
I’ve already covered the uploading files to Google sites via the Google sites API,
you can use java or python to write a script to mass upload all your files and htmls to your new google site,
but first you need to export everything out of the Mediawiki site.

here is a working method to export your site, these are the steps:

  1. install python
  2. download the mw2html script
  3. export the mediawiki site

Technorati Tags: , , , ,

SharePoint to Google sites – how to move your files

Many organisations now move to use the Google office suite for their day-to-day office needs,
this includes the Google sites service which allows you to easily create internal portals for the different
organisation’s departments.

This move allows for a department to share an internal web site that has easy access from home as well with the regular office google account,
it also allows for better collaboration with other branches of the same company located far away – as it saves the need for an office VPN, or the need to connect to a server that is located in a branch in another country,
instead – everybody just connect to Google.

But what do we do if our files are already on the office internal SharePoint?

apparently – the migration processes from SharePoint to Google sites is not as hard ,
here are two working options.

Continue reading

Technorati Tags: , ,

Great Online Stop Watch

This Online tool can be found here:

A very Easy to use online stop watch for all your IT needs, including:

  • limiting meeting sections (lets not talk about this subject more than 10 minutes)
  • counting time to measure a time limited action (how much time it really took the switch to reboot)
  • testing to see if an IT action was able to finish within the time limit set (DB switch should be completed in 5 minutes)

etc …

it has 2 useful modes:

  • Stop Watch
  • counter

both look like this:

but you setup the counter with this preliminary screen:



 

xkcd – funny system cartoons

Do you ever get this feeling when you see something and you can’t let go of it?

xkcd sandwich

xkcd cartoons got me at least twice that i can think of,
I’m hearing a lot these days about uptime, and this cartoon just hits the spot:

devotion to duty

devotion to duty

and another one that i went around with for months, couldn’t get it out of my head:

exploits of a mom

exploits of a mom

Technorati Tags: ,