Joel, responding to Matt, wrote: > > Hmm, that suggests a good point. While some one *can* do that or: > > > > ATTR=( $(cat /sys/kernel/config/ckrm/myresource/attr) ) > > > > the space available for environment variables is limited. So attempting > > to store a large (What's "large"?) attribute in an environment variable > > is a potentially buggy practice. This is a significant problem affecting > > large attributes in general. > > If you can't do it in sh, it's pretty much out of scope. This > is a taste rule I use, because like to shell program. Sure, not the end > of the world (not a hard rule, I guess), but worth thinking about.
I too like to shell program. Such potentially long vectors can be worked in the shell, just not placed in a single command line argument or environment variable. Constructs that do work (using the list of process id's in the file /dev/cpuset/tasks for these examples) include: 1. while read pid do ... do something with each $pid ... done < /dev/cpuset/tasks 2. < /dev/cpuset/tasks xargs ps -flp 3. sed -un p < /dev/cpuset/foo/tasks > /dev/cpuset/tasks Such shell constructs for dealing with vectors that might be longer than argument or environment length limits have been needed and known for decades. In an earlier message, Joel wrote: > You're effectively suggesting that a specific attribute type of > "repeated value of type X". No mixed types, no exploded structures, > just a "list of this attr" sort of thing. This does fit my personal > requirement of avoiding a generic, abusable system. Yes - what I call above a "vector." -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <[EMAIL PROTECTED]> 1.925.600.0401 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ ckrm-tech mailing list https://lists.sourceforge.net/lists/listinfo/ckrm-tech