Posted on Leave a comment

Install and Use nmon Tool To Monitor Linux Systems Performance – nixCraft

Source: Install and Use nmon Tool To Monitor Linux Systems Performance – nixCraft

 

Sample outputs:

Command to analyze Linux server performance - cpu / memory / network / disk and much more
Fig.01: nmon startup screen

nmon keyboard shortcuts

  • q – To stop and exit nmon.
  • h – To see quick help (hint) screen and press h again to remove the hints.
  • Use the following command to turn on or off stats:
    • c – See cpu stats.
    • m – See memory stats.
    • d – See disk stats.
    • k – See kernel stats.
    • n – See network stats.
    • N – See NFS stats.
    • j – See file system stats.
    • t – See top process.
    • V – See virtual memory stats.
    • . – See only busy disks/procs.
    • v – Verbose mode (display as Ok/warning/danger on screen).

Sample output from my home server:

nmon Command Examples
Fig.02: nmon command in action

How do I set default monitoring options for nmon?

To see the memory, network, disk and processor statistics immediately after the nmon command is started, run (or add in your shell startup file):
# export NMON=mndc
Run the nmon command:
# nmon

Capturing and analyzing data with nmon

You can capture the data to a file for later analysis and graphing. Type the following command:
# nmon -f -s2 -c 30
OR
# nmon -ft -s 30 -c 120
nmon will run as a daemon in the background and you can log out. nmon will complete the data file capture and it will save in a file *.nmon file such as nas02_120806_0202.nmon. Where,

  1. -f : Start data collect mode and output in spreadsheet format.
  2. -s 2 : Wait between 2 seconds refreshing the screen.
  3. -c30 : Total number of refreshes (30).
  4. -t : Spreadsheet includes top processes.
  5. -d disks : to increase the number of disks [default 256]
  6. -x : Capacity planning (15 min for 1 day = -fdt -s 900 -c 96)

You need to download nmonanalyser which is an Excel spreadsheet that takes an output file from nmon and produces some nice graphs to aid in analysis and report writing.

Check out related media

See a quick installation and demo of nmon command:

Posted on Leave a comment

Epson WF3640/CUPS Problems – Raspberry Pi Forums

This is a little late, but I was able to get my WF-3640 working by compiling the epson drivers from source.

Download src files from http://download.ebz.epson.net/dsc/du/02 … 16bfac03be
or

Code: Select all

wget https://download3.ebz.epson.net/dsc/f/03/00/06/06/12/5102fbe4d3ad88f52f9648d234fa24a19ba7ccfc/epson-inkjet-printer-escpr-1.6.14.tar.gz

sudo apt-get install libcups2-dev libcupsimage2 libcupsimage2-dev

gunzip epson-inkjet-printer-escpr-1.6.14.tar.gz
tar -xf epson-inkjet-printer-escpr-1.6.14.tar
cd epson-inkjet-printer-escpr-1.6.14

sudo ./configure
sudo make
sudo make install

The colors were coming out faded (draft mode) so I also had to set the printer media-type option to high, to fix this.

Source: Epson WF3640/CUPS Problems – Raspberry Pi Forums

Posted on Leave a comment

Arch Linux – Cannot start CUPS service with systemd

systemctl enable org.cups.cupsd.service 


systemctl start cups

If this work, check if /usr/lib/systemd/system/cups.socket exists. If not, this is the problem.

Create /etc/systemd/system/cups.socket with the following content.

[Unit]
Description=CUPS Printing Service Sockets

[Socket]
ListenStream=/var/run/cups/cups.sock

[Install]
WantedBy=sockets.target

Then, install CUPS service.

systemctl enable cups

Source: Arch Linux – Cannot start CUPS service with systemd

Posted on Leave a comment

Printing from Canon MF4150 printer using CUPS – Raspberry Pi Forums

I’m trying to print Canon ImageClass from my raspberry pi running raspbian jessie and from my iPad running iOS 10 using the manufacturers latest linux driver but I’m not having any luck. I have setup up the printer using CUPS, samba, avahi-daemon and avahi discover on the raspberry pi and used the manufacturers linux driver 3.31 of the CNCUPSMF4100ZS.ppd file in the CUPS configuration. I have shared the printer and installed the windows driver in a Windows 10 machine and I have no problem printing from windows 10 machine. At first I went to check the status of the printer in the CUPS printers page, it said ” IDLE – “File “usr/lib/cups/filter/pstoufr2cpca” not available: no such file or directory.” Then I copied the pstoufr2cpca directory from the manufacturers 3.31 linux driver to the /usr/lib/cups/filter/pstoufr2cpca and now I get this message ” Idle – “File “/Usr/lib/cups/filter/pstoufr2cpca” not available: Too many levels of symbolic links”.
Any suggestions? I would gladly appreciate it.

http://www.openprinting.org/printer/Can … imageCLASS

Source: Printing from Canon MF4150 printer using CUPS – Raspberry Pi Forums

Posted on Leave a comment

Logging – Dovecot Wiki

Dovecot Logging

Dovecot always logs a detailed error message if something goes wrong. If it doesn’t, it’s considered a bug and will be fixed. However almost always the problem is that you’re looking at the wrong log file; error messages may be logged to a different file than informational messages. By default Dovecot logs to syslog using mail facility. You can change the facility from syslog_facility setting. You can also configure Dovecot to write to log files directly, see below.

When using syslog, Dovecot uses 4 different logging levels:

  • info: Informational and debug messages.

  • warning: Warnings that don’t cause an actual error, but are useful to know about.

  • err: Non-fatal errors.

  • crit: Fatal errors that cause the process to die.

Where exactly these messages are logged depends entirely on your syslog configuration. Often everything is logged to /var/log/mail.log or /var/log/maillog, and err and crit are logged to /var/log/mail.err. This is not necessarily true for your configuration though.

You can find the correct log files using these methods:

  • Info log: After starting Dovecot, grep "starting up" /var/log/*. It should show a line such as: Dovecot v1.0.0 starting up

  • Error logs: Use dovecot --log-error command, which makes Dovecot log a few messages and exit. Then grep "This is Dovecot's" /var/log/* to find them. You should see:

    • With Dovecot v1.0.0 you’ll find only the crit log: This is Dovecot's error log

    • With Dovecot v1.0.1+ you’ll find all of them:
      • warningThis is Dovecot's warning log

      • errThis is Dovecot's error log

      • critThis is Dovecot's fatal log

  • You can also check your /etc/syslog.conf to see how it’s configured.

Internal Errors

If IMAP or POP3 processes encounter some error, they don’t show the exact reason for clients. Instead they show:

Internal error occurred. Refer to server log for more information. [2006-01-07 22:35:11]

The point is that whenever anything unexpected happens, Dovecot doesn’t leak any extra information about it to clients. They don’t need it and they might try to exploit it in some ways, so the less they know the better.

The real error message is written to the error log file. The timestamp is meant for you to help you find it.

Changing Log File Paths

If you don’t want to use syslog, or if you just can’t find the Dovecot’s error logs, you can make Dovecot log elsewhere as well:

log_path = /var/log/dovecot.log
# If you want everything in one file, just don't specify info_log_path
info_log_path = /var/log/dovecot-info.log

The warning and error messages will go to file specified by log_path, while everything else goes to info_log_path. If you do this, make sure you’re really looking at the log_path file for error messages, since the “Starting up” message is written to info_log_path file.

Rotating Logs

If you change from syslog to an external log file, you can use logrotate (available on most recent linux distros) to maintain the Dovecot logfile so it doesn’t grow beyond a manageable size. Save the below scriptlet as /etc/logrotate.d/dovecot:

# dovecot SIGUSR1: Re-opens the log files.
/var/log/dovecot*.log {
  missingok
  notifempty
  delaycompress
  sharedscripts
  postrotate
    /bin/kill -USR1 `cat /var/run/dovecot/master.pid 2>/dev/null` 2> /dev/null || true
  endscript
}

NOTE: change the path to the logfile(s) and the master.pid file as appropriate for your system configuration. The default location of master.pid is /usr/local/var/run/dovecot/master.pid.

Logging verbosity

There are several settings that control logging verbosity. By default they’re all disabled, but they may be useful for debugging.

  • auth_verbose=yes enables logging all failed authentication attempts.

  • auth_debug=yes enables all authentication debug logging (also enables auth_verbose). Passwords are logged as <hidden>.

  • auth_debug_passwords=yes does everything that auth_debug=yes does, but it also removes password hiding.

  • mail_debug=yes enables all kinds of mail related debug logging, such as showing where Dovecot is looking for mails.

  • verbose_ssl=yes enables logging SSL errors and warnings. Even without this setting if connection is closed because of an SSL error, the error is logged as the disconnection reason (v1.1+).

Source: Logging – Dovecot Wiki