Export System Log

I know there is /var/log/messages for looging the system error , as we have many servers , and some data in the log is duplicated , it seems time consuming to check regularly , is there any way to extract the important error from the log rather than check it frequently ?

thanks


Similar Content



Parallel File System Check

Reboot of Linux server consuming more time when there is a file system check (fsck)
Most of our server are using ext3 file system
Is there any possibility to make parallel fsck during reboot ?

An Error Occurred During The File System Check

Hi all!! Im new in this forum and also new at linux !!

I am installing an application that includes automatically the instalation of CentOS 6.3.

The server that hosts this application and OS had a power outage and then when i turn on the server again i get the error that you can see in this pictu http://postimg.org/image/7opm0xzel/

I have 2 disks in the system, 1 for the application and SO and other to store call recordings (thats what the application do, record calls!).

If I re-install the system it has no problem!! But i dont want to re-install the system every time i have a power outage because i lost too much and important information.

I have installed this application in other server and had no problem with power outage. In this server the diference is that it originally had raid and i "remove it" frome the BIOS. Maybe here is the problem??

Anyone can help me?? Remember im really new in linux !!

Swapping Distros

Hey guys, what's the best way to try out distros? Do I completely reinstall each time I want to change a distro and if so, would nt that wipe all my data? Or does my personal data , text files etc etc stay on the system and only the distro changes?

My Linux computer comes today and it has Ubuntu installed which I believe is a very popular and stable system but I really want to check out the so evolve distro because it looks fantastic and the reviews were very favorable. BUT I was warned on this forum not to get involved with beta distros until I know what I'm doing.

Does swapping distros erase all data ?

Yum Install / Package Install Error

I am getting Following output after running installation of some packages.

it gives me such error

rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD


What causing this ? i have downloaded the latest key from
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 and check it, the key is fine under my system /etc/pki/rpm-gpg

Configuration files of respo are also fine under /etc/yum.rpos.d/CentOS-Base.repo

Kindly help

Grep Output Of Command To Return 1 Or 0 For If Then Statement

So, I'm new here. Was thrown into the deepend (read: shallow pool) of linux administration of a few centos 6.5 servers in October, and I've been pretty slow on the uptake. Years of Windows administration and desktop support will do that I guess.

So we have qmail on our prod servers that send out messages for our webapps. Postfix failed last night on a prod server, and it occurred to me that it's happened a few times since I've started, and instead of waiting for clients to tell us, I should be more proactive. I came up with/begged/borrowed/stole a quick script to check to see if postscript was running, and if it was, restart it, and contact us. This was to be run from jenkins.

Quote:
if (( $(ps -ef | grep -v grep | grep postfix | wc -l) > 0 ))
then echo 'Mail is up.'
else echo 'Mail is down! Attempting to restart service...'
service postfix restart
fi
The question was then raised about an unresponsive process (zombies!), and I figured it might be a better idea to use postqueue -q, or mailq to either see a Mailbox is empty, or look for fatal if postfix is off or unresponsive. This is where I ran out of coffee and went over the deep end.

To get this to work, I thought it would be a good idea to run two scripts. One to check if the mail queue is empty, and if not, send up a flag. The next was to run a few minutes later to check and see if the mail queue was throwing up a fatal error, and if it was, throw up a second flag, which sent out an email from jenkins. Incidentally, if the mailqueue were clogged, this would also trigger an alert. Our mailqueue doesn't get a lot of traffic.

First command. Returns then and else statement without issue.
Quote:
if ((mailq | grep 'empty') < 0 ); then echo 'Mail is up.'; else echo 'Mail queue is not empty. Please check mail server'; fi
Second one... Not so much.
Quote:
if (mailq | grep 'fatal') < 1; then echo 'Mail is up.'; else echo 'Mail queue is not empty. Please check mail server'; fi
You can probably suss out what I'm trying to do here, even though I'm not doing it right. Any ideas? I know this is newbie stuff, and I appreciate your taking the time to read this people.

Rsync: Opendir "/db/pluto/test" Failed: Permission Denied (13)

I am getting the below error when try to run a perl script which copy mysql db using resync.

Could anyone please help



Creating log directories
Initializing data
WARNING: Use of this system is restricted and monitored!
This system is for the use of authorized users only. Individuals using
this computer system without authority, or in excess of their
authority, are subject to having all of their activities on this system
monitored and recorded by system personnel. In the course of
monitoring individuals improperly using this system, or in the course
of system maintenance, the activities of authorized users may also
be monitored. Anyone using this system expressly consents to such
monitoring and is advised that if such monitoring reveals possible
evidence of criminal activity, system personnel may provide the
evidence of such monitoring to law enforcement officials.
receiving incremental file list
rsync: opendir "/db/pluto/test" failed: Permission denied (13)
sent 12 bytes received 130 bytes 284.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 2 3) at main.c(1505) [generator=3.0.6]
Aborting : Database copy from primary to secondary failed.

Can Not Use Phpmyadmin

I have installed phpmyadmin , when access http://192.1010.118.0/phpmyadmin ,it pops the error

Code:
Forbidden

You don't have permission to access /phpmyadmin on this server.

I check the phpmyadmin.conf , I have released "allow all" to all directory .

I also check the /var/log/httpd/error_log, it have the following error , I tried change all files permission to 777 but still not work , would advise what is wrong in my server ? thanks

Code:
[authz_co error] [pid 2525] [client 192.1010.118.0:51878] AH01630: client denied by server configuration: /usr/share/phpMyAdmin

How To Solve This Logical Error Of LEACH?

Hello,
I have installed LEACH in NS-2.34 (ubunto-14.04)

I could run it successfully..

But it always stopped in a few seconds without sending data

i.e. Total Data=0

And it consumed a large energy!!!!

It didn't show any error in leach.error

Is it a logical error or others?

thanks

Check If A Tunnel Is Up - If Not, Log It.

I am using the following command to establish a reverse ssh tunnel with an ssh server

Code:
ssh root@my.hostname.here -R 5001:localhost:22

The server is rebooted every night and the tunnel is established automatically on reboot successfully every time.

What I need to do, is run a check, and if for some reason the tunnel is not established, I want to log it in a log file.

How can I reliably check if the tunnel is up or not?
Keep in mind that other ssh sessions might be active at the time, so I don't want the checking method to pick up any of those successful sessions. It has to check only the tunnel.

Thanks

New To Linux *again* - I Have Some Questions About Making Better Distro Installs

I am a basic computer user as far as operating systems are concerned. I do a little programming here and there but nothing special yet.

I have tried Linux many times, but I'm always left to getting *another* distro, after I fail to properly install Linux. Basically I resort to simple installs and found that Linux Mint and Ubuntu, most of the time work out of the box. However, after an installation, ... here and there I get error messages and sometimes crashes and i understand that my installation is not stable, simply because I did not properly configure some conf file or similar.

Another even more important problem I have is device drivers. Working from the command prompt (console) and the GUI is very confusing to me. I'm not sure if I'm setting something right with one and then unsetting it with the other. So basically I'm here with some noob questions and a couple specific ones.

1. Can someone recommend a good distro to learn to correctly configure drivers with manually. Remember, that I understand that there are distros that work out of the box mostly, but I actually am not worried about complexity as far as someone can guide me through errors. Which will lead to more questions of course.

2. After an installation there are sometimes a dozen errors during bootup, but no stops. Since it all scrolls by fast (most distros), where can I check after bootup what I need to fix?

The Goal is an *error free* stable installation of a linux distro, with enough common sense learned to take it to other distros.