Sponsored Content
Full Discussion: Linux programming
Operating Systems Linux Linux programming Post 302352374 by jim mcnamara on Friday 11th of September 2009 06:43:54 AM
Old 09-11-2009
Start by learning about the /proc filesystem. It has process information.
proc(5): process info pseudo-filesystem - Linux man page See /proc/[number]/stat particularly

This sounds like homework. The forums do not allow homework
 

9 More Discussions You Might Find Interesting

1. Programming

Programming C in Linux

Hello, I am a basic programer from back in the 80's/90's. I moved on to visual basic and now I want to learn C. I want to eventually program in Linux. Now, before I get on this band wagon I want to ask a few questions to make sure I am getting started out right. 1. Is C a good language to... (2 Replies)
Discussion started by: wizkid
2 Replies

2. New to Unix. Which books should I read?

Any Usefull Ebooks on Linux Programming?

Hi Forum! Is there anybody who can tell me where I can find some cool books on linux ( RH exclusively! if possible ) programming? :p (2 Replies)
Discussion started by: confusedoflife
2 Replies

3. Linux

Need Help Of Linux Programming

hi frnds i need help on linux programming as well as how to configure linux. if u feel free than plz forward me the mail so that i can go through. email removed thanx regards :) vishwa pratap singh (1 Reply)
Discussion started by: luckyvishwa
1 Replies

4. UNIX for Dummies Questions & Answers

Linux Programming in JAvA

is it advisible to do Linux Programming in JAVA.. If so, whats the advantage over C++ or C.. Cud anyone also help me out by providing some links in this regard.. Would be highly appreciated.. (1 Reply)
Discussion started by: srikumar_cs
1 Replies

5. Programming

c programming in linux

can you guys please let me know what are some of the c programming environment program? you know the ones with checking syntax and auto indentation and such.. dont want to just use vi (although someone did mention to me that in vim, there are capabilities.. but not sure how) thanks in advance. (6 Replies)
Discussion started by: convenientstore
6 Replies

6. Linux

C programming in linux

Hi friends In my linux application, i want to update output in same place i.e.. I want to display my output in specific location in screen(console output) ITERATION 1: (e.g. start diplay from 5th ROW 5th COLOUMN) if my message is "hi" then first time 'h' should print in 5th ROW... (2 Replies)
Discussion started by: venkatgopu
2 Replies

7. Shell Programming and Scripting

Shell programming in Linux

Hi, I have been working on Sun Solaris since a long time. Recently I got to work on RH Linux. My Linux version details are: Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux I have a simple command in my shell script: export BKPTAG=`date... (3 Replies)
Discussion started by: sagarparadkar
3 Replies

8. UNIX for Dummies Questions & Answers

From iOS programming to Linux system programming

Hello. I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations: 1. Linux and iOS are UNIX-like systems, POSIX compliant. 2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies

9. Red Hat

Linux programming

Develop a program to display file given on the command line to STDOUT, please give sample program (2 Replies)
Discussion started by: ainstin
2 Replies
TASKSET(1)							   User Commands							TASKSET(1)

NAME
taskset - set or retrieve a process's CPU affinity SYNOPSIS
taskset [options] mask command [argument...] taskset [options] -p [mask] pid DESCRIPTION
taskset is used to set or retrieve the CPU affinity of a running process given its pid, or to launch a new command with a given CPU affin- ity. CPU affinity is a scheduler property that "bonds" a process to a given set of CPUs on the system. The Linux scheduler will honor the given CPU affinity and the process will not run on any other CPUs. Note that the Linux scheduler also supports natural CPU affinity: the scheduler attempts to keep processes on the same CPU as long as practical for performance reasons. Therefore, forcing a specific CPU affinity is useful only in certain applications. The CPU affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU and the highest order bit corresponding to the last logical CPU. Not all CPUs may exist on a given system but a mask may specify more CPUs than are present. A retrieved mask will reflect only the bits that correspond to CPUs physically on the system. If an invalid mask is given (i.e., one that corresponds to no valid CPUs on the current system) an error is returned. The masks may be specified in hexadecimal (with or without a leading "0x"), or as a CPU list with the --cpu-list option. For example, 0x00000001 is processor #0, 0x00000003 is processors #0 and #1, 0xFFFFFFFF is processors #0 through #31, 32 is processors #1, #4, and #5, --cpu-list 0-2,6 is processors #0, #1, #2, and #6. When taskset returns, it is guaranteed that the given program has been scheduled to a legal CPU. OPTIONS
-a, --all-tasks Set or retrieve the CPU affinity of all the tasks (threads) for a given PID. -c, --cpu-list Interpret mask as numerical list of processors instead of a bitmask. Numbers are separated by commas and may include ranges. For example: 0,5,8-11. -p, --pid Operate on an existing PID and do not launch a new task. -V, --version Display version information and exit. -h, --help Display help text and exit. USAGE
The default behavior is to run a new command with a given affinity mask: taskset mask command [arguments] You can also retrieve the CPU affinity of an existing task: taskset -p pid Or set it: taskset -p mask pid PERMISSIONS
A user can change the CPU affinity of a process belonging to the same user. A user must possess CAP_SYS_NICE to change the CPU affinity of a process belonging to another user. A user can retrieve the affinity mask of any process. SEE ALSO
chrt(1), nice(1), renice(1), sched_getaffinity(2), sched_setaffinity(2) See sched(7) for a description of the Linux scheduling scheme. AUTHOR
Written by Robert M. Love. COPYRIGHT
Copyright (C) 2004 Robert M. Love. This is free software; see the source for copying conditions. There is NO warranty; not even for MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AVAILABILITY
The taskset command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/. util-linux August 2014 TASKSET(1)
All times are GMT -4. The time now is 05:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy