Linux

Tmux, Super PuTTY and other useful linux tools

Posted by daro on September 11, 2014
Debian, Linux / No Comments

linux-logo

A few really useful linux monitoring tools. Meet Tmux, Super PuTTY and others.

Terminal  divided into multiple panes with Tmux.

 

This is how I  monitor performance of my server and a list of few useful tools to do so:

  1. Super PuTTY is a Windows application used primarily as a window manager for the PuTTY SSH Client. It allows you to embed PuTTY terminal instances inside of a windows form providing a better tabbed interface when multiple connections are used. SuperPutty does not do any ssh or terminal management itself since PuTTY does an excellent job itself.
  2. Htop – an interactive process viewer for Linux that graphically represents system usage and lets you kill processes from within. A bit like a top but on steroids.
  3. Apachetop – Real time website monitor
  4. ‘tail –f=name /var/log/apache2/access.log’ command that gives me live preview of my web server’s access log.
  5. Iftop – is a real time bandwidth monitor that produces a frequently-updated list of network connections. By default, the connections are ordered by bandwidth usage, with only the “top” bandwidth consumers shown.
  6. Command prompt area for issuing commands to the server.

 

Sendmail: stat=Deferred: Connection refused by [127.0.0.1]

Posted by daro on July 04, 2014
Debian, Email, Linux, Sendmail / 5 Comments

 

Sendmail

 Sendmail not sending messages? There you go!

There is a very helpful manual on setting up sendmail server. However after following it I could receive but not send emails. Messages were queuing with status ‘Deferred: Connection refused by [127.0.0.1]’ and the same error could be found in /var/log/mail.log

Solution to it was just to simply add one more line to your sendmail configuration file /etc/mail/sendmail.cf. Enabling Mail Transport Authority to your local network adapter. By default part of this config file looks like this:

# SMTP daemon options
O DaemonPortOptions=Family=inet, Name=MTA-v4, Port=smtp, Addr=XX.XX.XX.XX
O DaemonPortOptions=Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1

Where XX.XX.XX.XX is an ip address of your public network interface. After enabling MTA on a local interface it should look like below:

# SMTP daemon options
O DaemonPortOptions=Family=inet, Name=MTA-v4, Port=smtp, Addr=XX.XX.XX.XX
O DaemonPortOptions=Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1
O DaemonPortOptions=Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1

Then sendmail restart with ‘/etc/init.d/sendmail restart’ or ‘service sendmail restart’. Depending on your distro, and it finally started sending and receiving emails.