4 ms·
Hrm, no I hadn't. I don't know much about this command. Could you give me a (thawing) example?
by snikch 9y ago
Hrm, no I hadn't. I don't know much about this command. Could you give me a (thawing) example?
- Florin_Andrei 9y agofor p in `seq 1 $(sysctl -n hw.ncpu)`; do yes > /dev/null & done Alternatively you could run Boinc with a cancer research project or something - defrost your food AND help the world become a better place.
- htfy96 9y ago$(nproc --all) on Linux
- Twirrim 9y agoIt's pretty straightforward: parallel -- yes yes yes yes >/dev/null If you've more processors than that, add on extra yesses.
- flukus 9y agoI just realized a simple shell script would make a passable imitation of JMeter, without the horrible UI and xml.
- hnlmorg 9y agoA shell script wouldn't be enough (I've tried). However there are plenty of CLI based load testing tools, including one I've written myself. And if you need something more advanced then there is always Gatling, which is run via the command line and produces proper HTML reports and graphs plus is extended in code (eg in Scala) rather than GUI controls
- edp 9y agoOT but if you want a nice alternative to jmeter, check out Gatling. Instead of XML, you can code your scenarios in scala. edit : hnlmorg beat me to it :)
- Bromskloss 9y agoThat manual counting of cores is what I thought we would let `parallel` handle! I have never actually used parallel, though, so I don't know how to best do it.
- cat199 9y agoone way on a leenukz parallel -- `sed -ne 's:^processor.*:yes:p' < /proc/cpuinfo` on openbsd: parallel -- `perl -e 'printf("yes "x\`sysctl -n hw.ncpu\`)'` don't try the latter in a shell script without being prepared to debug tho.
- Bromskloss 9y agoRight. I was unclear. What I really meant was that I was thinking that `parallel` could automatically spin up more and more jobs until it sensed that there is no further performance to be gained. I'm not sure to what extent that is true, though.