Pages

Welcome to My Blog

This is to share my IT experience with friends all around the world.
I have been working in Linux Fedora Systems for more than 8 years. Its fun to share knowledge and learn..
As everyone knows when a problem arises in your systems "googling" is the way that many depend on..

All the posts here are my working experiences during my working life.. So you can count on it..

I have added the references where I got help in solving IT issues


Monday, March 21, 2016

Linux Performance Observability Tools

I found this image from Facebook (It seems facebook is not providing gossips only :-) which is very useful for Linux system administrators in finding issues in the systems.



I have downloaded the image from its original site (Site owner Brendan D. Gregg) and the original site http://www.brendangregg.com/linuxperf.html


A big thank to Brendan D. Gregg for publishing this.

Thursday, March 10, 2016

iptables Issue in CentOS7

I had issues in enabling iptables in CentOS7. After following the post (link given below) I was able to resolve the issue I had with enabling iptables.

Error I got when I tried to enable iptables

server1#systemctl restart iptables.service
Failed to issue method call: Unit iptables.service failed to load: No such file or directory


Following is the screen shot of the answer received through the post http://stackoverflow.com/questions/24756240/how-can-i-use-iptables-on-centos-7


Wednesday, December 9, 2015

Remove Unwanted Mails from mailq in postfix Server

We had an issue in a development server which sends thousands of mail messages to the system administrator. Those mails were queued in the out going mail server which affected the normal mail delivery process in the out going mail server.

I used following command to remove unwanted mails from the mailq.

mailq |fgrep apache@testdomain.nic.lk|sed 's/\*.*//'| postsuper -d -

Here apache@testdomain.nic.lk is the mail sending user and I did not use the recipient address to filter the mails as he might delete required mails also.

Clarification 

fgrep will display the detailed line of the mails sent by 'apache@testdomain.nic.lk' which are queued in the mailq and using sed command, just the mailIDs can be listed. This list will be an input to postsuper process to delete the given mailID.

Normally, postsuper -d <MailID> will delete the mail in the queue with given mail ID. So the above command will list all mailIDs in the mailq send by a particular user and forward to delete it with postsuper user command.

Good To Read:

https://www.howtoforge.com/delete-mails-to-or-from-a-specific-email-address-from-postfix-mail-queue