Operating System - Linux
1828484 Members
2785 Online
109978 Solutions
New Discussion

Linux scripting for system check.

 
raqeeb
Occasional Contributor

Linux scripting for system check.

Greetings

Can anyone help me on writting a script to perform regression test for my linux server.

I am new to shell scripting.

please advise .

Regards

8 REPLIES 8
Steven Schweda
Honored Contributor

Re: Linux scripting for system check.

What, exactly, are you interested in testing?

What, exactly, is "my linux server"?
B. Hulst
Trusted Contributor

Re: Linux scripting for system check.

Are you changing some software in the Linux OS itself and want to regression test those changes, like kernel changes?
raqeeb
Occasional Contributor

Re: Linux scripting for system check.

Greetings

I have a linux server installed with RHEL 5.3.
I would like to have the regression test of cpu activity,memory activity,process activity..kernel logs .hardware logs.. disk space ...swap space...etc....
I mean the machine should check all the above activity and report me if found errors.

Please let me know if you need further info.

Your help will be highly apprecieated.

Regards



Matti_Kurkela
Honored Contributor

Re: Linux scripting for system check.

http://en.wikipedia.org/wiki/Regression_testing

The term "regression testing" is usually in the context of software or system development, not system health monitoring.

In general, regression testing requires that you define a set of test cases for defined requirements and known already-solved problems. When you make a change to the system (e.g. you find and fix a new problem), you run the regression test suite to make sure you haven't accidentally re-introduced an older problem when fixing the new one, or violated one of the basic requirements.

Then you add a test for the problem you just fixed, so in the future the test suite will alert you if this same problem reappears (e.g. something has caused your fix to become ineffective).

Regression tests are, by their nature, very specific to their subject.

> test of cpu activity,memory activity,process activity..kernel logs .hardware logs.. disk space ...swap space

This sounds like system health monitoring, not regression testing.

There are various system health monitoring solutions available. Some of them are even open source/freeware. Why are you re-inventing the wheel? Have you examined the available solutions and found them somehow inadequate or not applicable? Why?

If you really are thinking about regression testing and not generic health monitoring, please define the unit you're primarily wishing to test: is it some application, the Linux OS kernel, or the system hardware?

Performance regression testing will also require using your own judgement: if the new version runs the test faster but uses more memory and/or disk space to do that, is that an acceptable trade-off or not? How much is too much?

MK
MK
raqeeb
Occasional Contributor

Re: Linux scripting for system check.

Greetings

Thank you very much for your reply.

I would like to have a shell script for machine health check monitoring.


regards
B. Hulst
Trusted Contributor

Re: Linux scripting for system check.

Tim Clarke
Advisor

Re: Linux scripting for system check.

Unless you want the mental exercise of writing your own scripts - and you have selected possibly a large exercise - I recommend using a monitor package instead. We use nagios (http://www.nagios.org/) and I thoroughly recommend it. There are many others - search if you can or ask for suggestions.
Steven E. Protter
Exalted Contributor

Re: Linux scripting for system check.

Shalom,

This has been done. A google search of this very site will bring up good examples.

linux system health monitor script site:itrc.hp.com

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com