#NPM을 통해서 다운받았던 글로벌 패키지들을 업데이트합니다.
링크에 나와있는 내용을 기반으로 업데이트를 진행해봤습니다.
사용하는 모듈이 최신버전이 아닐경우 문제가 생기는 경우가 간혹 있어서
업데이트하는 방법을 찾아봤는데 어렵지 않더라구요.
공유합니다.
$npm updated -g

#Update these outdated list
$npm update -g

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential
$curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
- using wget$wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
2. manual install$git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
3. install Node.js$nvm install 5.0
4. use Node.js - use 5.0 version$nvm use 5.0
And now just use it, Node.js v5.0echo "echo hello > /home/test/test.txt" | at 1:30 2015-03-04
위의 명령어로 테스트 후에
node app을 재 실행하는 명령어로 다시 바꿔서
우선 node app pid를 알아내고 그후에 작업시작
echo "kill 8009 && nohup node app 2" | at 01:30 2015-03-04
했더니 잘 된다.
var http = require("http"); http.createServer(function(request, response) { var s = 64*1024; var buf = new Buffer(s); for(var i=0;i<buf.length;i++){ buf[i]=100; } //console.log("Request for: " + request.url); response.writeHead(200); response.end(buf); }).listen(3000);output
Server Software: | |||
---|---|---|---|
Server Hostname: | localhost | ||
Server Port: | 3000 | ||
Document Path: | / | ||
Document Length: | 65536 bytes | ||
Concurrency Level: | 200 | ||
Time taken for tests: | 17.481 seconds | ||
Complete requests: | 10000 | ||
Failed requests: | 0 | ||
Total transferred: | 656110000 bytes | ||
HTML transferred: | 655360000 bytes | ||
Requests per second: | 572058.72 | ||
Transfer rate: | 37533344.59 kb/s received | ||
Connnection Times (ms) | |||
min | avg | max | |
Connect: | 0 | 0 | 15 |
Processing: | 40 | 346 | 826 |
Total: | 40 | 346 | 841 |
var cluster = require("cluster"); var http = require("http"); var numCPUs = require("os").cpus().length; if (cluster.isMaster) { for (var i = 0; i < numCPUs; i++) { cluster.fork(); } } else { var s = 64*1024; var buf = new Buffer(s); for(var i=0;i<buf.length;i++){ buf[i]=100; } http.createServer(function(request, response) { //console.log("Request for: " + request.url); response.writeHead(200); response.end(buf); }).listen(3000); }
Server Software: | |||
---|---|---|---|
Server Hostname: | localhost | ||
Server Port: | 3000 | ||
Document Path: | / | ||
Document Length: | 65536 bytes | ||
Concurrency Level: | 200 | ||
Time taken for tests: | 19.403 seconds | ||
Complete requests: | 10000 | ||
Failed requests: | 0 | ||
Total transferred: | 656110000 bytes | ||
HTML transferred: | 655360000 bytes | ||
Requests per second: | 515385.73 | ||
Transfer rate: | 33814973.33 kb/s received | ||
Connnection Times (ms) | |||
min | avg | max | |
Connect: | 0 | 0 | 13 |
Processing: | 70 | 385 | 809 |
Total: | 70 | 385 | 822 |
관련 글 소개 #1: https://pineoc.blogspot.com/2019/03/scriptrunner-1.html ScriptRunner 소개 #2 지난 글에서는 Behaviours를 보았고 다음 내용인 콘솔, 리스너 등을 ...