LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-03-2006, 01:40 PM   #1
MSafty
LQ Newbie
 
Registered: Aug 2005
Location: Egypt
Distribution: Suse and Red hat
Posts: 14

Rep: Reputation: 0
snapshot for web server


i have a web server running fedora core 2 with apache and is running number of websites,
i made #top -c command to check the load average
and i found that the load average rises from 1.05 for the normal average and reaches 4.0 load average instantly but i found that there's any abnormal or strange processes,
so, i want something to take snapshot from the server processes every definite time and make history for it if anybody have an idea.
 
Old 01-03-2006, 03:39 PM   #2
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
Code:
#!/bin/bash
mkdir -p processdumps

while [ true ]; do
ps aux > processdumps/$(date +%s)
sleep $1
done
Save that in a file, chmod +x it, and run it like this:
Code:
./snapshotter.sh 10
Where the number is the amount of seconds to wait between snapshots. Hit ^C to stop. The dumps will be at processdumps/
 
Old 01-03-2006, 04:04 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Also check out the "vmstat", "sar" and the "w" commands for troubleshooting. These don't take the specific snapshots you asked for, but may be of some use to you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant make web server run my local web page... Nik0s Linux - Newbie 22 10-08-2006 10:30 PM
(web)camera - quick snapshot how-to longtex Linux - Software 0 09-29-2004 03:48 PM
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM
setting up password protected web forms on an apache web server AZDAVE Linux - Security 3 07-07-2004 12:03 PM
Can't access Linux web server web pages from LAN client jaydave Linux - Networking 4 03-16-2003 02:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration