Hi,
I have a name.txt which is stored:
APPLE
ORANGE
RED
BLUE
GREEN
and my script is:
$name=`cat name.txt
for file_number in `ls 1 /appl/CH_DATA/archive/CACHE/CDBACKUP$name*.archived
however, my script cannot read name.txt and put into my scrip line, I would like the output is to... (18 Replies)
I have a template that I usually use to generate stats on an hourly basis for a number of cell sites altogether. I would like to be able to write a script that would go to the template and extract the information for any single site at any time during the day. For example, let's say that my... (4 Replies)
Hello,
I am writing a shell script to do the following. It greps information from the messages log and then I use the cut command to isolate the field I need (the username) and output the information to a text file.
I now have to do the following. Count how many times each user logged in. So... (3 Replies)
Hi, suppose I have a colon delimeterd file with address field like this
blue:john's hospital new haven CT 92881-2322
yellow:La times copr red road los angeles CA90381 1302
red:las vegas hotel sand drive Las vegas NV,21221
How do I create a new field that contain the zip code information... (3 Replies)
Hello there,
I am trying to extract (string) information ( a list words) from 4 files and then put the results into 1 file. Currently I am doing this using grep -f list.txt file1 . and repeat the process for the other 3 files. The reasons i am doing that (a) I do know how to code (b) each file... (4 Replies)
Hi there!
Well, I'm writing a script to obtain certain information about files. Specifically, I want to get the information about those files which last access were in the last 24 hours, so I'm doing something like this:
find <directory_name> -atime -1 -printf '%f %a\n'
I would also... (4 Replies)
I want to write a script that extracts a value from a line of text. I know it can be done using awk but I've never used awk before so I don't know how to do it. The text is:
Mem: 100M Active, 2150K Cache, 500M Buf, 10G Free
I want to extract the free memory value to use as a variable. In... (5 Replies)
Dear Experts,
I need your help here. I have lot of teradata DDL's as follows, i want to extract field names , field attributes and NOT NULL information from DDL.Could you please help here.
Sample DDL:
CREATE MULTISET TABLE APS_CALL_IN_PICKUP_CANCELED ,NO FALLBACK ,
NO BEFORE... (2 Replies)
Discussion started by: srikanth38
2 Replies
LEARN ABOUT SUNOS
td_ta_get_stats
td_ta_enable_stats(3C_DB) Threads Debugging Library Functions td_ta_enable_stats(3C_DB)NAME
td_ta_enable_stats, td_ta_reset_stats, td_ta_get_stats - collect target process statistics for libc_db
SYNOPSIS
cc [ flag... ] file... -lc_db [ library... ]
#include <proc_service.h>
#include <thread_db.h>
td_err_e td_ta_enable_stats(const td_thragent_t *ta_p, int on_off);
td_err_e_stats td_ta_reset(const td_thragent_t *ta_p);
td_err_e td_ta_get_stats(const td_thragent_t *ta_p, td_ta_stats_t *tstats);
DESCRIPTION
The controlling process can request the collection of certain statistics about a target process. Statistics gathering is disabled by
default. Each target process has a td_ta_stats_t structure that contains current values when statistic gathering is enabled.
The td_ta_enable_stats() function turns statistics gathering on or off for the process identified by ta_p, depending on whether or not
on_off is non-zero. When statistics gathering is turned on, all statistics are implicitly reset as though td_ta_reset_stats() had been
called. Statistics are not reset when statistics gathering is turned off. Except for nthreads and r_concurrency, the values do not change
further, but they remain available for inspection by way of td_ta_get_stats().
The td_ta_reset_stats() function resets all counters in the td_ta_stats_t structure to zero for the target process.
The td_ta_get_stats() function returns the structure for the process in tstats.
The td_ta_stats_t structure is defined in <thread_db.h> and contains the following members:
typedef struct {
int nthreads; /* total number of threads in use */
int r_concurrency; /* requested concurrency level */
int nrunnable_num; /* numerator of avg runnable threads */
int nrunnable_den; /* denominator of avg runnable threads */
int a_concurrency_num; /* numerator, avg achieved concurrency */
int a_concurrency_den; /* denominator, avg achieved concurrency */
int nlwps_num; /* numerator, avg number of LWPs in use */
int nlwps_den; /* denominator, avg number of LWPs in use */
int nidle_num; /* numerator, avg number of idling LWPs */
int nidle_den; /* denominator, avg number of idling LWPs */
} td_ta_stats_t;
The nthreads member is the number of threads that are currently part of the target process. The r_concurrency member is the current
requested concurrency level, such as would be returned by thr_setconcurrency(3C). The remaining members are averages over time, each
expressed as a fraction with an integral numerator and denominator. The nrunnable_num and nrunnable_den members represent the average num-
ber of runnable threads. The a_concurrency_num and a_concurrency_den members represent the average achieved concurrency, the number of
actually running threads. The a_concurrency_num and a_concurrency_den members are less than or equal to nrunnable_num and nrunnable_den,
respectively. The nlwps_num and nlwps_den members represent the average number of lightweight processes (LWPs) participating in this
process. They must be greater than or equal to a_concurrency_num and a_concurrency_den, respectively, since every running thread is
assigned to an LWP, but there can at times be additional idling LWPs with no thread assigned to them. The nidle_num and nidle_den members
represent the average number of idle LWPs.
RETURN VALUES
TD_OK The call completed successfully.
TD_BADTA An invalid internal process handle was passed in.
TD_DBERR A call to one of the imported interface routines failed.
TD_ERR Something else went wrong.
ATTRIBUTES
See attributes(5) for description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO libc_db(3LIB), thr_getconcurrency(3C), attributes(5)SunOS 5.10 20 Oct 1998 td_ta_enable_stats(3C_DB)