- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Some question on HP Unix 9000
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2007 11:38 PM
тАО05-27-2007 11:38 PM
1) I want to know the memory usage (cpu usage ) of a particular process which top was not shown . What will be the command ?
2) i want to schedule a job which should be running between 6.30 to 8.30 about a interval of 30 mins from monday to friday . how it can be schedule in one go ?
3) what is the diff between at and crontab command ?
4) what is the command for bigger file size in dir and sub directory ?
5) i want to cut from 100 lines to end of the file and want to save it in another file in one go . What will be the command ?
Thanx in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2007 12:02 AM
тАО05-28-2007 12:02 AM
Re: Some question on HP Unix 9000
1) try this one :
ps -elf | grep
and take SZ column (for RAM used) or TIME column (for CPU usage);
3) "at" run once a time ; "crontab" skedule a job to run periodically;
4) please , specify better what do you mean with
5) if file is not too big, with "vi" you can cut lines from 100 to the end and write them in another file (see "vi").
Hoper this help
regards
pg
And as Peter Godron says
Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
on how to reward any useful answers given to your questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2007 12:39 AM
тАО05-28-2007 12:39 AM
Re: Some question on HP Unix 9000
2) i want to schedule a job which should be running between 6.30 to 8.30 about a interval of 30 mins from monday to friday . how it can be schedule in one go ?
#*******************************************************************************
00,30 06-18 * * 1-5 /home/yogeeraj/myscript.sh 1>/home/yogeeraj/logfiles/output-myscript.crn 2>/home/yogeeraj/logfiles/error-myscript.crn
#*******************************************************************************
# END OF TABLE day0->Sunday day6->Saturday
#*******************************************************************************
**Unfortunately, as it is above it will also run at 6:00 a.m. You should add the test condition in your script so that the 6:00 am. execution just exit the program.
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2007 12:43 AM
тАО05-28-2007 12:43 AM
Re: Some question on HP Unix 9000
Still i have not exactly got the answer for the following :
1) after issuing the command I have the following output :
$ ps -elf |grep 28763
1 R oracle 28763 1 254 241 20 dd84900 6126 - 08:
35:37 ? 2:17 oracleg036p (LOCAL=NO)sleep 5:02 54.71 54.61 oracleg030p
1 S gcs03t 28933 29620 2 154 20 1d282500 20 1f0800aa 08:3
9:12 pts/tc 0:00 grep 28763
How to know the memory status of the following pid ?
2 )??
3) Is there any command where i can view the biggere file size in my dir and sub directory ?
5) I can do it in vi by issuing :3,$w file name But i want to do it without manual intervention
Regds,
Subrata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2007 12:57 AM
тАО05-28-2007 12:57 AM
Re: Some question on HP Unix 9000
4) what is the command for bigger file size in dir and sub directory ?
one quick and dirty way that just came to my mind:
ls -alR |sort +4 -5nr |head -1
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2007 01:09 AM
тАО05-28-2007 01:09 AM
Re: Some question on HP Unix 9000
1) it's then ten column ( "6126" in your example);
5) try if it's possible with "sed".
hth
besta regards
pg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2007 01:26 AM
тАО05-28-2007 01:26 AM
Solution5) i want to cut from 100 lines to end of the file and want to save it in another file in one go . What will be the command ?
split -l $(expr $(wc -l originfile.txt | cut -c1-5) - 100) originfile.txt newfile.txt
E.g.
============
$split -l $(expr $(wc -l originfile.txt | cut -c1-5) - 100) originfile.txt newfile.txt
$ll
-rw-r--r-- 1 yogeeraj users 206361 May 28 17:20 newfile.txtaa
-rw-r--r-- 1 yogeeraj users 7395 May 28 17:20 newfile.txtab
$ wc -l originfile.txt
2730 originfile.txt
$ wc -l newfile.txtaa
100 newfile.txtaa
$ wc -l newfile.txtab
2630 newfile.txtaa
$
Hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2007 01:34 AM
тАО05-28-2007 01:34 AM
Re: Some question on HP Unix 9000
sorry. my last script contains a BUG!
cut -c1-5
Assumes that the figure obtained does not exceed a 5 digits figure for the count of number of lines in the file.
So be warned. Maybe other can find the right command and modify this for me.
sorry again
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2007 03:35 AM
тАО05-28-2007 03:35 AM
Re: Some question on HP Unix 9000
for point 5)
i tried another way to do that:
with the command
vi - your_file < mod_file.vi
where mod_file.vi is
:100,$w new_file
hth
best regards
pg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2007 12:55 PM
тАО05-28-2007 12:55 PM
Re: Some question on HP Unix 9000
I'm not sure split(1) will really work since it's job is to make a bunch of files, covering the whole file.
Instead of using split, there is a command to do exactly what Subrata wants:
$ tail -n +100 file1 > file2
(If you want line 100, you may have to use +99.)
>Yogeeraj: Assumes that the figure obtained does not exceed a 5 digits figure for the count of number of lines in the file.
It's pretty simple, don't use cut(1) (or use cut -f 1), fix wc:
... $(wc -l < originfile.txt)
>pg: vi - your_file < mod_file.vi
I'm not sure why you would want to use vi for batch, that's what ex(1) is for. But sed(1) would also work:
$ sed -n -e '100,$p' your_file > new_file