The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
.
google unix.com



HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
User entry in both cron.allow and cron.deny ksvaisakh SUN Solaris 4 09-26-2009 03:46 PM
cron job starts new cron proccess ron76 SUN Solaris 3 05-12-2008 01:07 AM
Is the Length of User ID for AIX Limit to 8 Characters? meihua_t AIX 2 04-07-2008 02:04 AM
AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log Keith Johnson AIX 0 01-09-2008 08:32 PM
Limit of no of characters PER LINE in a unix file mohapatra Shell Programming and Scripting 5 10-10-2006 04:18 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 3 Weeks Ago
MartinF MartinF is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 6
cron 80 characters limit

Hello everyone.
I am trying to set up a monitor based on a "top" command statistic as follows:
top -bc -n1 > output.txt

I've put this command into a small script which is called by a cron... but there is something strange happening: the cron is limiting the output to output.txt to 80 characters.
If I call this script from a standart command line, evenrything is fine, no wrapping is occuring.
I'm using a HP-UX shell.
I red somewhere on internet that it could be a case of wrong editor - but that's not my case.

Could please advice?
Thank you.

Martin
  #2 (permalink)  
Old 3 Weeks Ago
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,568
For a start
Code:
ra:/home/vbe $ top -bc -n1 > output.txt 
top: illegal option -- b
Usage:  top [-u] [-q] [-dx] [-sx] [-n number] [-f filename]
ra:/home/vbe $ uname -r
B.11.00
...
What do you call an HP-UX shell?

Did you look at the man pages of top?
(there is a great option: -f filename... etc...)

---------- Post updated at 17:53 ---------- Previous update was at 17:49 ----------

Code:
ran:/home/vbe $  top -bc -n1 > output.txt
top: illegal option -- b
Usage:  top [-u] [-q] [-P] [-dx] [-sx] [-p pset_id] [-n number] [-f filename]
ran:/home/vbe $ uname -r
B.11.11
Please specify which version of OS you are using for it does help us looking at your issue ( in the present case I have no 11.23 or above to chek at the moment...) the code you gave does not work on 11.00 or 11.11...

Last edited by vbe; 3 Weeks Ago at 12:58 PM.. Reason: addendum
  #3 (permalink)  
Old 3 Weeks Ago
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,163
To endorse "vbe" the command options stated aren't valid with the "normal" version of "top" on HP-UX 11.11. The "-n" switch for example is for items per page not iterations.
  #4 (permalink)  
Old 3 Weeks Ago
MartinF MartinF is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 6
Hello guys, sorry, wrong post The machine is a Linux.
I hope I can find a solution on my own on internet.
Thank you...

---------- Post updated at 11:18 AM ---------- Previous update was at 07:22 AM ----------

Hi, just to inform you: the solution was adding EXPORT COLUMNS=250 to the script.
I found the solution under another HP-UX formu, so I don't think it was a case of environment, rather something else.
Have a nice day!
Martin
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:19 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0