Hi
Maybe you can suggest a nicer way to do the following:
RET_STR=$(echo ${RET} | sed -e 's/0/Object is not mapped/' \
-e 's/1/Operation Internal Error/' \
-e 's/2/Operation Invalid Arguments/' \
-e 's/3/Object is mapped/' \
-e 's/4/Path not found/') (3 Replies)
Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)
Hello,
I trying to extract text that is surrounded by xml-tags. I tried this
cat tst.xml | egrep "<SERVER>.*</SERVER>" |sed -e "s/<SERVER>\(.*\)<\/SERVER>/\1/"|tr "|" " "
which works perfect, if the start-tag and the end-tag are in the same line, e.g.:
<tag1>Hello Linux-Users</tag1>
... (5 Replies)
Hi, all of you!!!
I have this code and I won to build-in some more code.
I know this is a lot of code.
if ; then
if ; then
SYSROOT="$1"
S_SCRIPT="cd $1 ; ./etc/rc.sysinit 2>&1 &"
fi
else
... (22 Replies)
Hi,
I'm using code below to assign title for Putty Window to show user@hostname+curr directory.
Trying to read this "write only" language, can anybody help me to go thru this string, too many thing in it I can't expaing
Tx
T
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:... (1 Reply)
hi,
can someone tell me how can I translate the following line from sed to awk?
`sed 's/^*:*:*:*:*:\(*\):.*/\1/
How to use code tags when posting data and code samples. (14 Replies)
Hi,
I have a number of files containing the information below.
"""""
Fundallinfo
6.3950 14.9715 14.0482
"""""
I would like to grep for Fundallinfo and use it to read the next line? I ideally would like to read the three numbers that follow in the next line and... (2 Replies)
this code below is very useful in calculating mean and quartiles. however, i would really like to translate it to awk without having to write to any external file:
#!/bin/sh
filename="tmp.txt"
sort -n $1 >$filename
rows=`wc -l $filename|cut -d' ' -f1`
q2=`echo "($rows+1)/2" |bc`
... (3 Replies)
Discussion started by: SkySmart
3 Replies
LEARN ABOUT DEBIAN
hwloc_cpuset_to_nodeset
Conversion between cpuset and nodeset(3) Hardware Locality (hwloc) Conversion between cpuset and nodeset(3)NAME
Conversion between cpuset and nodeset -
Functions
static inline void hwloc_cpuset_to_nodeset (hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, hwloc_nodeset_t nodeset)
static inline void hwloc_cpuset_to_nodeset_strict (struct hwloc_topology *topology, hwloc_const_cpuset_t cpuset, hwloc_nodeset_t nodeset)
static inline void hwloc_cpuset_from_nodeset (hwloc_topology_t topology, hwloc_cpuset_t cpuset, hwloc_const_nodeset_t nodeset)
static inline void hwloc_cpuset_from_nodeset_strict (struct hwloc_topology *topology, hwloc_cpuset_t cpuset, hwloc_const_nodeset_t nodeset)
Detailed Description
There are two semantics for converting cpusets to nodesets depending on how non-NUMA machines are handled.
When manipulating nodesets for memory binding, non-NUMA machines should be considered as having a single NUMA node. The standard conversion
routines below should be used so that marking the first bit of the nodeset means that memory should be bound to a non-NUMA whole machine.
When manipulating nodesets as an actual list of NUMA nodes without any need to handle memory binding on non-NUMA machines, the strict
conversion routines may be used instead.
Function Documentation
static inline void hwloc_cpuset_from_nodeset (hwloc_topology_ttopology, hwloc_cpuset_tcpuset, hwloc_const_nodeset_tnodeset) [static]
Convert a NUMA node set into a CPU set and handle non-NUMA cases. If the topology contains no NUMA nodes, the machine is considered as a
single memory node, and the following behavior is used: If nodeset is empty, cpuset will be emptied as well. Otherwise cpuset will be
entirely filled. This is useful for manipulating memory binding sets.
static inline void hwloc_cpuset_from_nodeset_strict (struct hwloc_topology *topology, hwloc_cpuset_tcpuset, hwloc_const_nodeset_tnodeset)
[static]
Convert a NUMA node set into a CPU set without handling non-NUMA cases. This is the strict variant of hwloc_cpuset_from_nodeset. It does
not fix non-NUMA cases. If the topology contains some NUMA nodes, behave exactly the same. However, if the topology contains no NUMA nodes,
return an empty cpuset.
static inline void hwloc_cpuset_to_nodeset (hwloc_topology_ttopology, hwloc_const_cpuset_tcpuset, hwloc_nodeset_tnodeset) [static]
Convert a CPU set into a NUMA node set and handle non-NUMA cases. If some NUMA nodes have no CPUs at all, this function never sets their
indexes in the output node set, even if a full CPU set is given in input.
If the topology contains no NUMA nodes, the machine is considered as a single memory node, and the following behavior is used: If cpuset is
empty, nodeset will be emptied as well. Otherwise nodeset will be entirely filled.
static inline void hwloc_cpuset_to_nodeset_strict (struct hwloc_topology *topology, hwloc_const_cpuset_tcpuset, hwloc_nodeset_tnodeset)
[static]
Convert a CPU set into a NUMA node set without handling non-NUMA cases. This is the strict variant of hwloc_cpuset_to_nodeset. It does not
fix non-NUMA cases. If the topology contains some NUMA nodes, behave exactly the same. However, if the topology contains no NUMA nodes,
return an empty nodeset.
Author
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.
Version 1.4.1 Mon Feb 27 2012 Conversion between cpuset and nodeset(3)