I have a CentOS 8 (3.10) running on VirtualBox 6.0... And I have 2 questions about WCHAN
The 'ps' man page describes WCHAN as:
Quote:
nwchan WCHAN address of the kernel function where the process
is sleeping (use wchan if you want the kernel
function name). Running tasks will display a
dash ('-') in this column.
wchan WCHAN name of the kernel function in which the process
is sleeping, a "-" if the process is running, or
a "*" if the process is multi-threaded and ps is
not displaying threads.
I haven't see the "*" yet, but I'll see a "?" in the output of the "ps" command with regularity. Usually associated with the rcu_sched kernel process, but the "?" does appear for other processes. I haven't found a definition for the "?"... What does it mean?
My 2nd question is about a discrepancy I'm seeing between the output of the 'ps' command and the 'System Monitor' GUI utility. Under the 'ps' command, I'll see several processes in a run state and will have a "-" under WCHAN. Yet under the "System Monitor", those same processes will be in a run state with a WCHAN code of "poll_schedule_timeout". From what I've read this indicates a process is waiting for I/O... Shouldn't these processes be in a sleep state?
Sorry for a dummy question I believe. I am just wanting to know how do I assign a default $1 argument if one is not provided.
At the moment, I am doing something like below:
arg1="${1:-foo}"And then I check $arg1 in case/esac. I am just wondering if there is a way for me to simply do...
Tagged:
beginners
Discussion started by
newbie_01
and has been viewed 6,180 times.
There has been
3 replies
in this discussion.
The last reply was by
bakunin
.
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
Tagged:
shell scripts
Discussion started by
asandy1234
and has been viewed 4,554 times.
There has been
9 replies
in this discussion.
The last reply was by
asandy1234
.
I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables.
I need to read this file which is an input to my script
Config.txt
file name, first path, second...
Tagged:
shell scripts
Discussion started by
ketanraut
and has been viewed 7,049 times.
There has been
7 replies
and 1 user thanks in this discussion.
The last reply was by
Chubler_XL
.
I need a shell script, which would search the result values from another files.
1)execute " select column1 from table_name" query on the table.
2)Based on the result, need to be grep from .wft files.
could please explain about this.Below is the way i am using.
#!/bin/sh...
Tagged:
linux, oracle 10g, shell scripts
Discussion started by
Rami Reddy
and has been viewed 3,934 times.
There has been
4 replies
and 2 user thanks in this discussion.
The last reply was by
Rami Reddy
.
Hello All,
I have a below data in a .csv file where all rows where col1 is A, col2 is odd numbers, similarly even numbers for all rows where col1 is B.
Note that my data has some other columns(not shown here) too (around 100) after col2.
Tool,Data
so on
.... ...
Tagged:
shell scripts
Discussion started by
ks_reddy
and has been viewed 3,019 times.
There has been
4 replies
and 2 user thanks in this discussion.
The last reply was by
elixir_sinari
.
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use...
Tagged:
compare columns, matching rows, print particular column, replace blank, shell scripts
Discussion started by
Santoshbn
and has been viewed 20,402 times.
There has been
10 replies
and 5 user thanks in this discussion.
The last reply was by
Santoshbn
.
Hi. Before throwing my question, thanks to everybody for paying attention. Sorry if my english isn't good enough, but it's not my mother tongue.
That's my question:
I have a java program that throws an external program with "Process p = Runtime.getRuntime.exec(***)". The communication between...
Tagged:
beginners
Discussion started by
jlopezperez
and has been viewed 15,326 times.
There has been
2 replies
in this discussion.
The last reply was by
jlopezperez
.
Tagged:
advanced, capture and return child processes
Discussion started by
tuxhats
and has been viewed 2,330 times.
There has been
6 replies
in this discussion.
The last reply was by
Corona688
.
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in...
Tagged:
shell scripts
Discussion started by
repinementer
and has been viewed 10,677 times.
There has been
16 replies
in this discussion.
The last reply was by
repinementer
.
Hello,
Do you have any idea why the below sed command is also replacing the value of "PARAMETER2" instead of just "PARAMETER" in file1 ?
% parameter=PARAMETER
% new_value=2
% cat file1
PARAMETER=1
PARAMETER2=1
% cat file1 | sed s/*$/${new_value}/1
PARAMETER=2
PARAMETER2=2
Thanks.
Tagged:
sed, shell scripts
Discussion started by
majormark
and has been viewed 2,408 times.
There has been
3 replies
in this discussion.
The last reply was by
majormark
.