Hi,
In Linux how to find out what will be the stack size allocated for a process?
Actually i have to fork n number of processess, and will call exec. I will be execing an executable which is already multithreaded and each thread size is defined. My doubt is how to know if the size of the... (2 Replies)
I want to find out how many disk blocks are used by only data (and not metadata) by a file.
But as far as I can tell, if the file has holes, then there is no way to know this.
You can find out the logical size of the file (physical size + hole blocks).
You can get the physical size of the... (3 Replies)
Hi,
I want to know the command which can be used for finding the % of disk space occupied by files & sub-folders inside a given mount in Sun Solaris
For eg: I have /tmp/ folder when I sat df -k it will give the percentage of space used by /tmp/.
Say if I want to see how much % the files &... (2 Replies)
Hi Friends..
I have a small problem with the hostname of my system.I had installed Solaris 10 X86 on Vmware in my windows 2000 system.After booting of my solaris system,if i give check-hostname command it says ,,
hostname is not fully qualified ,,change the hostname to hostname.xxx.xxxxxx.com... (3 Replies)
Hi,
This is the Third thread i'm putting here for the same problem. :(
Actually, i'm trying a script like this.. but its taking a long time.. about 3 days to complete fully..
#!/bin/ksh
if
then
exit 1
fi
while read i
do
while read j
do
field7=`echo $j|cut -d "|"... (12 Replies)
hi
actually i want to get fully qualified path name of the file when the file name is entered as command line argument while running a shell script
ex. if i run the shell as $./test.sh ./nsdnet_file.csv
the it should display me the full path of the file like
/dialp/Release/bin/nsdnet_file.csv... (3 Replies)
I want to extend this script.
This must also be able to show me that a port is already assigned to a service but not running now
there must be three different messages
port 8949 is open but not listening
port 8959 is open
port 8999 hasn't been assigned to any service.
I know that... (1 Reply)
Guys,
Can some one help me?
I need to find the total percent of space occupied by core files on my unix system.
I know df -k will give me the percent space utilization for a directory but how do we replicate the space for a file? (3 Replies)
I tried changing my /etc/inet/hosts file for my server to:
<ip address> <hostname> <fqdn>
but when I go to reboot the file changes right back to:
<ip address> <hostname>
how do I get the <fqdn> to stick on a reboot.
Thanks (2 Replies)
I am new to scripting and this is probably the 4th or 5th simple script I have written. I am working with a HUGE number of data that need to be organized into folders and named a certain way. I wrote the naming script using a while function to go through the 1000-some folders and rename the files... (0 Replies)
Discussion started by: notluckyhannah
0 Replies
LEARN ABOUT DEBIAN
chpst
chpst(8) System Manager's Manual chpst(8)NAME
chpst - runs a program with a changed process state
SYNOPSIS
chpst [-vP012] [-u user] [-U user] [-b argv0] [-e dir] [-/ root] [-n inc] [-l|-L lock] [-m bytes] [-d bytes] [-o n] [-p n] [-f bytes] [-c
bytes] prog
DESCRIPTION
prog consists of one or more arguments.
chpst changes the process state according to the given options, and runs prog.
OPTIONS -u [:]user[:group]
setuidgid. Set uid and gid to the user's uid and gid, as found in /etc/passwd. If user is followed by a colon and a group, set the
gid to group's gid, as found in /etc/group, instead of user's gid. If group consists of a colon-separated list of group names,
chpst sets the group ids of all listed groups. If user is prefixed with a colon, the user and all group arguments are interpreted
as uid and gids respectivly, and not looked up in the password or group file. All initial supplementary groups are removed.
-U [:]user[:group]
envuidgid. Set the environment variables $UID and $GID to the user's uid and gid, as found in /etc/passwd. If user is followed by
a colon and a group, set $GID to the group's gid, as found in /etc/group, instead of user's gid. If user is prefixed with a colon,
the user and group arguments are interpreted as uid and gid respectivly, and not looked up in the password or group file.
-b argv0
argv0. Run prog with argv0 as the 0th argument.
-e dir envdir. Set various environment variables as specified by files in the directory dir: If dir contains a file named k whose first
line is v, chpst removes the environment variable k if it exists, and then adds the environment variable k with the value v. The
name k must not contain =. Spaces and tabs at the end of v are removed, and nulls in v are changed to newlines. If the file k is
empty (0 bytes long), chpst removes the environment variable k if it exists, without adding a new variable.
-/ root
chroot. Change the root directory to root before starting prog.
-n inc nice. Add inc to the nice(2) value before starting prog. inc must be an integer, and may start with a minus or plus.
-l lock
lock. Open the file lock for writing, and obtain an exclusive lock on it. lock will be created if it does not exist. If lock is
locked by another process, wait until a new lock can be obtained.
-L lock
The same as -l, but fail immediately if lock is locked by another process.
-m bytes
limit memory. Limit the data segment, stack segment, locked physical pages, and total of all segment per process to bytes bytes
each.
-d bytes
limit data segment. Limit the data segment per process to bytes bytes.
-o n limit open files. Limit the number of open file descriptors per process to n.
-p n limit processes. Limit the number of processes per uid to n.
-f bytes
limit output size. Limit the output file size to bytes bytes.
-c bytes
limit core size. Limit the core file size to bytes bytes.
-v verbose. Print verbose messages to standard error. This includes warnings about limits unsupported by the system.
-P pgrphack. Run prog in a new process group.
-0 Close standard input before starting prog.
-1 Close standard output before starting prog.
-2 Close standard error before starting prog.
EXIT CODES
chpst exits 100 when called with wrong options. It prints an error message and exits 111 if it has trouble changing the process state.
Otherwise its exit code is the same as that of prog.
EMULATION
If chpst is called as envdir, envuidgid, pgrphack, setlock, setuidgid, or softlimit, it emulates the functionality of these programs from
the daemontools package respectively.
SEE ALSO sv(8), runsv(8), setsid(2), runit(8), runit-init(8), runsvdir(8), runsvchdir(8)
http://smarden.org/runit/
http://cr.yp.to/daemontools.html
AUTHOR
Gerrit Pape <pape@smarden.org>
chpst(8)