10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there a way I can specify the name of a list as an argument to a shell script and then use the values of that list name in the script?
I need to do this WITHOUT using case statements.
Something like this:
check.sh list1
#!/bin/bash
list1="www.amazon.com www.google.com"... (9 Replies)
Discussion started by: gctaylor
9 Replies
2. Shell Programming and Scripting
Hi Team,
Here's the situation.
I have approximately 300000 to 500000 jpg files in /appl/abcd/work_dir
mv /appl/abcd/work_dir /appl/abcd/process_dir
The above move command will work if the jpg files count is close to 50000 (not sure). If the count is less this mv command holds good. But if... (14 Replies)
Discussion started by: kmanivan82
14 Replies
3. Shell Programming and Scripting
Dear Experts,
I have a list of 10K files in a directory. I am not able to execute any commands lile ls -lrt, awk, sed, mv, etc........
I wanna execute below command and get the output. How can I achieve it?? Pls help.
root# awk -F'|' '$1 == 1' file_20120710* | wc -l
/bin/awk: Argument list... (2 Replies)
Discussion started by: Naga06
2 Replies
4. Shell Programming and Scripting
Hello,
The scenario is as follows, I have a background process running initially for which i know the PID on machine1. I use ssh from machine 2 to execute a script in machine 1. For some reason the back ground process is terminated. I would like to know which process caused the... (6 Replies)
Discussion started by: prasbala
6 Replies
5. UNIX for Advanced & Expert Users
hi all,
I am trying to find the process id of the subsequent process created via fork and exec calls in perl.
For eg:
envVarSetter dataCruncher.exe < input.txt > output.txt
When I fork and exec the above command,
it returns only the pid of envVarSetter and I don't know how to find the... (9 Replies)
Discussion started by: matrixmadhan
9 Replies
6. Shell Programming and Scripting
I have to write a script to determine whether given command line argument ($1) contains "*" symbol or not, if $1 does not contains "*" symbol add it to $1, otherwise show message "Symbol is not required". For e.g. If we called this script q5 then after giving ,
$ q5 /bin
Here $1 is /bin, it... (5 Replies)
Discussion started by: cynosure2009
5 Replies
7. Shell Programming and Scripting
Hi
Any idea how to get the process id of the process using the ports
lsof -i :portnumber does not work in my machine. I am on sun Solaris SPARC.
Any suggestion is highly appreciated (1 Reply)
Discussion started by: kinny
1 Replies
8. Linux
Hello,
Iam running a apache webserver in CentOS recenlty a hacker has attacked my server using RFI attack and did something in my server.. After that everyday at 8Pm my httpd is using about 5000 pid's actually in normal it takes only about 30 - 40 pid's. and also exim uses 2000 pid's totally my... (2 Replies)
Discussion started by: dheeraj4uuu
2 Replies
9. HP-UX
I get my CPU speed use pstat APIs
use this program serach google and just test it
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/param.h>
#include <sys/pstat.h>
#define CPU_ID 0
#define HZ_PER_MHZ 1000000
int main()
{
struct pst_processor pst;
union pstun pu;
... (0 Replies)
Discussion started by: alert0919
0 Replies
10. UNIX for Dummies Questions & Answers
is there a way to find the process id of a process because i have same process invoked several times.
when i need to kill them, i get confused with the id.
Thanks,
sskb
:( (8 Replies)
Discussion started by: sskb
8 Replies
pthread_nsg_get(3) Library Functions Manual pthread_nsg_get(3)
NAME
pthread_nsg_get - Gets the list of threads in a NUMA Scheduling Group (libpthread library)
SYNOPSIS
#include <numa.h>
int pthread_nsg_get(
nsgid_t nsg,
pthread_t *list,
long size );
PARAMETERS
Specifies the NUMA Scheduling Group (NSG) from which to retrieve the list of threads. Specifies the address of the array of thread identi-
fiers where the list of threads will be written. Specifies the size (in number of thread identifiers) of the array where the list of
threads will be written.
DESCRIPTION
The pthread_nsg_get() returns into the buffer pointed to by list an array of nsg_thread structures containing the process ids and thread
indexes for all threads attached to the specified NSG. The list argument specifies the number of nsg_thread structures that the array must
accommodate.
To obtain the value for size, the application can first call pthread_nsg_get() with list set to null and read in the value of the
nsg_nthread member in the nsgid_ds structure that the call returns. On the second call to pthread_nsg_get(), the application uses the
nsg_nthread value for size and includes the appropriate value for list.
RESTRICTIONS
The effective user ID of the calling process must be equal to the value of nsg_perm.cuid or nsg_perm.uid in the associated nsgid_ds struc-
ture; or the calling process must have read permissions to the NSG.
RETURN VALUES
Success. Failure. In this case, the returned integer indicates the type of error. Possible errors are as follows: The calling process does
not have read permission on the NSG. The nsg argument does not specify a valid NSG identifier, or the nsg argument is not a valid address.
ERRORS
None.
SEE ALSO
Functions: nsg_attach_pid(3), nsg_get(3), numa_intro(3), pthread_nsg_attach(3)
Files: numa_types(4)
pthread_nsg_get(3)