nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Mytop 1 run script

This is a discussion on Mytop 1 run script within the Shell scripting forums, part of the Development/Scripting category; Hello, need to save 1 run of mytop when server has load over.. mytop -b would do fine, but it ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Linux answers from nixCraft.


Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 13-04-2009, 02:36 AM
Junior Member
User
 
Join Date: Jul 2008
Location: SM
OS: CentOs
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
cosminnci is on a distinguished road
Default Mytop 1 run script

Hello,

need to save 1 run of mytop when server has load over..

mytop -b would do fine, but it displays only 80 or so columns.

how should be run in script file with more columns, and define terminal type?

tried something like:
#!/bin/sh
COLUMNS=160
mytop -b


but not working.

Regards,
Reply With Quote
  #2 (permalink)  
Old 28-04-2009, 01:17 AM
Junior Member
User
 
Join Date: Apr 2009
OS: Ubuntu
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
fcojocaru is on a distinguished road
Default

This should be more helpful in debugging the problem:
MySQL :: MySQL 5.1 Reference Manual :: 5.2.5 The Slow Query Log
Also try to place the output in a file like this:
mytop -b > mytop.out 2>&1
and then less mytop.out

Hope it helps
Reply With Quote
  #3 (permalink)  
Old 02-05-2009, 11:07 AM
Junior Member
User
 
Join Date: Jul 2008
Location: SM
OS: CentOs
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
cosminnci is on a distinguished road
Default

I have used slow log query sometimes it helps.
the output to file is ok but I want to run it on event (when server load is over 8 ) along with ps.and when directing to file:
ESC[0mESC[33m 879478 zimxxx_ag localhost zimxxx_ag 1 Query SELECT * FROM `sa

it shows only part of the query, and would need the whole string to point where is the problem.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT +5.5. The time now is 03:29 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38