Operating System - HP-UX
1827451 Members
4070 Online
109965 Solutions
New Discussion

Re: How to interpret the flag information of the process

 
SOLVED
Go to solution
Wang,MinJie
Super Advisor

How to interpret the flag information of the process

Hi all
When I ran "ps -l" I got the following message:
" F S UID PID PPID C PRI NI
401 R 0 3957 3955 0 178 20
401 R 0 4046 3957 1 178 20 "
I want to know what does "401" mean under the "F" column
Thx in advance
10 REPLIES 10
Torsten.
Acclaimed Contributor

Re: How to interpret the flag information of the process

These are flags, see the man page

http://docs.hp.com/en/B2355-60105/ps.1.html

scroll down to "flags".

...
flags Flags (octal and additive) associated with the process:

0 Swapped

1 In core

2 System process

4 Locked in core (e.g., for physical I/O)

10 Being traced by another process

20 Another tracing flag



The default heading for this column is F.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Robert-Jan Goossens
Honored Contributor

Re: How to interpret the flag information of the process

Hi,

From the man ps command.
---
-l Show columns flags, state, uid, pid, ppid, cpu, intpri, nice, addr, sz, wchan, tty, time, and comm, in that order.
---
flags Flags (octal and additive) associated with the process:

0 Swapped
1 In core
2 System process
4 Locked in core (e.g., for physical I/O)
10 Being traced by another process
20 Another tracing flag
---

The default heading for this column is F.

Regards,
Robert-Jan
Wang,MinJie
Super Advisor

Re: How to interpret the flag information of the process

Hey
I've consulted the manual myself and I've seen those information.
But what does "401" mean actually?
Thx
Dennis Handly
Acclaimed Contributor

Re: How to interpret the flag information of the process

>Robert-Jan: Flags (octal and additive)
1 In core

>But what does "401" mean actually?

Well, the "1" means in memory.
Wang,MinJie
Super Advisor

Re: How to interpret the flag information of the process

I'm sorry but I think it doesn't make sense:
"401" means it's both in core and swapped?
Dennis Handly
Acclaimed Contributor

Re: How to interpret the flag information of the process

>I think it doesn't make sense:
"401" means it's both in core and swapped?

That's not how you OR octal bits. It means: 0400 | 0001
And unfortunately it doesn't define 400.
Wang,MinJie
Super Advisor

Re: How to interpret the flag information of the process

So Dennis
What does 0400|0001 actually mean?
Thanks
Dennis Handly
Acclaimed Contributor

Re: How to interpret the flag information of the process

>What does 0400|0001 actually mean?

This is the C syntax for ORing octal 400 with octal 001.

Looking at indicates that 400 is 0x100:
#define PS_SWLAZY 0x100 process has associated Lazy Swap region(s)
Wang,MinJie
Super Advisor

Re: How to interpret the flag information of the process

Hey Den
I'm fresh man of this
Would you please tell me what's "OR" and which manual in HP-UX I can get the actual meaning of Flag information:"401" or "421" or "1421"?
Dennis Handly
Acclaimed Contributor
Solution

Re: How to interpret the flag information of the process

>Would you please tell me what's "OR"

When you have bits, you can do bitwise OR and AND and other operations. Each octal digit has 3 different bits, kind of like the bits in the permissions for ls(1) for user, group and other.
http://docs.hp.com/en/B3901-90014/ch05s04.html

>which manual in HP-UX I can get the actual meaning of Flag information: "401" or "421" or "1421"?

As I mentioned, the man page is broken. Only bits 0 to octal 20 are documented. The others are in the header file.

0040 == 0x20 text is locked in memory
0100 == 0x40 data is locked in memory
0200 == 0x80 syscall tracing enabled
0400 == 0x100 has associated Lazy Swap region(s)
1000 == 0x200 has 64-bit address space layout
2000 == 0x400 was or is privileged
4000 == 0x800 is ganged

So 401 is lazy swap, in memory.
So 1421 is 64 bit, lazy, traced process has been waited for, in memory