Sponsored Content
Full Discussion: Few problems
Top Forums UNIX for Dummies Questions & Answers Few problems Post 72541 by vivekshankar on Saturday 21st of May 2005 11:03:23 AM
Old 05-21-2005
Few problems

Hi

how can i do this?

1) shell script which writes data and time on to a file if filesystem exceeds 70% of space.

2) make entry to cron table to run a script every 15 mins.

and can anyone expplain or demonstrate the difference between variables used in inside a function and outside a funstion(both variables hav the same name)

ps : this is not homwork.....i am working ..i jus wante dto learn unix and doin some case studies...

Thanks and Regards
Vivek.S
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

'make' problems (compliation problems?)

I'm trying to compile and install both most recent version of 'make' and the most recent version of 'openssh' on my Sparc20. I've run into the following problems... and I don't know what they mean. Can someone please help me resolve these issues? I'm using the 'make' version that was... (5 Replies)
Discussion started by: xyyz
5 Replies

2. UNIX for Advanced & Expert Users

Problems with Last

Hi, I,ve a Unixware 7.1.3 working correctly for two years ago, since a several weeks I've a problem with the command last . The information that this command return is : For example : 1.- The user root , time login : 12:15 h, time logoff 12:15 h (the real time is 14:00). Connected time is... (3 Replies)
Discussion started by: By_Jam
3 Replies

3. UNIX for Dummies Questions & Answers

problems with If

I'm having problems uses "if" it works fine when i do this. #!/bin/sh a= 10 qw= 2 w= 20 { if && ;then echo 3 fi } However if i try to do #!/bin/sh a= 10 (5 Replies)
Discussion started by: THM
5 Replies

4. UNIX for Dummies Questions & Answers

Problems with using less

Hello, I am having problems with using less on Linux version 2.6.18-92.1.17.el5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)). I am using csh but have the same problems on bash. If I pipe something to less it works perfectly i.e. cat file | less... (9 Replies)
Discussion started by: z1dane
9 Replies

5. Shell Programming and Scripting

Problems with $?

Hello, I have the following piece of code that tries to retrieve the result of a .sh: . $HOME/prueba/Scripts/Recogida/recogida_sedra.sh resultado=$? echo "el resultado es : $resultado" if ; then echo "Se va a preprocesar los archivos" In the code of recogida.sh I have the... (8 Replies)
Discussion started by: danietepa
8 Replies

6. SuSE

Problems!!

good friends I am new to linux and I have the following TELNET service problem entering data devo telnet to a Windows server 2003 server and passes will not let me since the move to this server by telnet tells me the characters and thus invalidates me income, I have a service application... (1 Reply)
Discussion started by: pepetico
1 Replies

7. UNIX for Dummies Questions & Answers

Problems with IF Else ??!!

I have written the following code in cygwin to create directories in windows based on the parameter passed. echo $1 > fullpath path1=`awk -F / '{print $1}' $fullpath path2=`awk -F / '{print $2}' $fullpath if then if then if then continue ... (4 Replies)
Discussion started by: janardhanamk
4 Replies

8. Shell Programming and Scripting

If/then problems

#! /bin/bash # ask what the user would like to do CMD=$CMD MBA=$MB RS=$RS CT=$CT echo echo -n "What would you like to do?? REMEMBER WHEN PROGRAMMING ICP's TO SELECT CORRECT COMMAND ACCORDING TO NECCESSARY TYPE CODE! Please enter a command ct = program ctek ... (5 Replies)
Discussion started by: tdalyman
5 Replies

9. Shell Programming and Scripting

About ps -ef and if-else problems

I'm new in Shell Programming and Scripting, I would like to ask some questions. ps -ef | grep $appNAme | grep -v grep <-- what will it return when it find a process is running? return 1 or 0 if then exit 1 <--- if = 0 , run this ? else continue <--- if = 1 , run this ?... (5 Replies)
Discussion started by: LoAlex
5 Replies
sa1(1M) 																   sa1(1M)

NAME
sa1, sa2, sadc - system activity report package SYNOPSIS
[t n] time] time] sec] [t n] [ofile] DESCRIPTION
System activity data can be accessed at the special request of a user (see sar(1M)) and automatically on a routine basis as described here. The operating system contains a number of counters that are incremented as various system actions occur. These include CPU utilization counters, buffer usage counters, activity counters for disk, lunpath, HBA, tape I/O, and tty devices, switching and system-call counters, file-access counters, queue activity counters, and counters for inter-process communications. and shell procedures and are used to sample, save, and process this data. the data collector, samples system data n times every t seconds and writes in binary format to ofile or to standard output. If t and n are omitted, a special record is written. This facility is used at system boot time to mark the time at which the counters restart from zero. Executing the following command in a system startup script: writes the special record to the daily data file to mark the system restart. Instructions for creating system startup scripts may be found in the which is online on The shell script a variant of is used to collect and store data in binary file where dd is the current day. The arguments t and n cause records to be written n times at an interval of t seconds, or once if omitted. The following entries, if placed in produce records every 20 minutes during working hours and hourly otherwise (see cron(1M)): The shell script a variant of writes a daily report in file The options are explained in sar(1M). The following entry reports important activities hourly during the working day: Structure of the binary daily data file lists information about the active processors. The structure of the binary daily data file is: struct sa { long version[PST_MAX_CPUSTATES]; /* sadd file version */ psetid_t psetid[SAR_MAX_PROCS][2]; /* mapping of psetid and cpus in the * system */ int cpus[SAR_MAX_PROCS]; /* active processors list */ unsigned long long cpu [PST_MAX_CPUSTATES]; /* average time spent in each state */ unsigned long mp_cpu [SAR_MAX_PROCS][PST_MAX_CPUSTATES]; /* per proc cpu time */ unsigned long proc_cnt; /* MP: number of active processors */ unsigned long max_proc_cnt; /* MP: max active processors */ unsigned long bread; /* transfer of data between system * buffers and disk or other block devices */ unsigned long bwrite; unsigned long lread; /* access of system buffers */ unsigned long lwrite; unsigned long phread; /* transfer via physical device mechanism */ unsigned long phwrite; unsigned long swapin; /* number of swap transfers */ unsigned long swapout; unsigned long bswapin; /* number of 512-bytes transferred * (for bswapin:include initial loading of * some programs */ unsigned long bswapout; unsigned long pswitch; /* process switches */ unsigned long syscall; /* system calls of all types */ unsigned long sysread; /* specific system calls */ unsigned long syswrite; /* number of write() system calls */ unsigned long sysfork; /* number of fork() system calls */ unsigned long sysexec; /* number of exec() system calls */ unsigned long runque; /* run queue of processes in memory and * runable */ unsigned long runocc; /* time occurring */ unsigned long mp_runque [SAR_MAX_PROCS]; unsigned long mp_runocc [SAR_MAX_PROCS]; unsigned long swpque; /* swap queue of processes swapped */ * out but ready to run. */ unsigned long swpocc; unsigned long iget; /* use of file access system routines */ unsigned long namei; unsigned long dirblk; /* number of directory blocks encountered */ unsigned long readch; /* characters transferred by read system * calls */ unsigned long writech; /* characters transferred by write system * calls*/ unsigned long rcvint; /* receive interrupt */ unsigned long xmtint; /* transfer interrupt */ unsigned long mdmint; /* modem interrupt */ unsigned long rawch; /* input character */ unsigned long canch; /* input character processed by cannon */ unsigned long outch; /* output character */ unsigned long msg; /* message primitive */ unsigned long sema; /* semaphore primitive */ unsigned long select; /* select system calls */ unsigned int sztext; /* current size of text table */ unsigned int szinode; /* current size of inode table */ unsigned int szfile; /* current size of file table */ unsigned int szproc; /* current size of proc table */ unsigned int msztext; /* maximum size of text table */ unsigned int mszinode; /* maximum size of inode table */ unsigned int mszfile; /* maximum size of file table */ unsigned int mszproc; /* maximum size of proc table */ unsigned long inodeovf; /* cumulative overflows of inode table */ * since boot */ unsigned long fileovf; /* cumulative overflows of file table */ * since boot */ unsigned long procovf; /* cumulative overflows of proc table */ * since boot */ time_t ts; /* time stamp */ unsigned long elements_in_use; long elements[20]; }; WARNINGS
This structure can change in future releases, with no support for backward compatibility. FILES
address file daily data file daily report file SEE ALSO
timex(1), cron(1M), sar(1M), intro(7). on STANDARDS CONFORMANCE
sa1(1M)
All times are GMT -4. The time now is 05:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy