-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #231 from grondo/subprocess-io
Subprocess io
- Loading branch information
Showing
23 changed files
with
1,424 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FLUX-PS(1) | ||
============ | ||
:doctype: manpage | ||
|
||
|
||
NAME | ||
---- | ||
flux-ps - List managed subprocess of one or more flux brokers | ||
|
||
|
||
SYNOPSIS | ||
-------- | ||
*flux* *ps* ['--rank=RANKS'] ['--verbose'] COMMANDS... | ||
|
||
|
||
DESCRIPTION | ||
----------- | ||
flux-ps(1) dumps a process listing from one or more flux-broker processes. | ||
Processes are listed by sender UUID, broker rank, local PID, and | ||
the command being run. | ||
|
||
OPTIONS | ||
------- | ||
|
||
*-r, --rank*'=RANKS':: | ||
Target specific ranks in 'RANKS'. Default is to target all ranks. | ||
|
||
*-v, --verbose*:: | ||
Run with more verbosity. | ||
|
||
|
||
AUTHOR | ||
------ | ||
This page is maintained by the Flux community. | ||
|
||
|
||
RESOURCES | ||
--------- | ||
Github: <http://github.com/flux-framework> | ||
|
||
|
||
COPYRIGHT | ||
--------- | ||
include::COPYRIGHT.adoc[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,3 +144,9 @@ fanout | |
NOHOST | ||
sysexits | ||
NODEID | ||
SIGINT | ||
SIGTERM | ||
signo | ||
subprocess | ||
PID | ||
ps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--[[-------------------------------------------------------------------------- | ||
* Copyright (c) 2015 Lawrence Livermore National Security, LLC. Produced at | ||
* the Lawrence Livermore National Laboratory (cf, AUTHORS, DISCLAIMER.LLNS). | ||
* LLNL-CODE-658032 All rights reserved. | ||
* | ||
* This file is part of the Flux resource manager framework. | ||
* For details, see https://github.com/flux-framework. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation; either version 2 of the license, or (at your option) | ||
* any later version. | ||
* | ||
* Flux is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the IMPLIED WARRANTY OF MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the terms and conditions of the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, write to the Free Software Foundation, Inc., | ||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
* See also: http://www.gnu.org/licenses/ | ||
---------------------------------------------------------------------------]] | ||
-- | ||
-- base64 encode/decode in Lua from: | ||
-- http://lua-users.org/wiki/BaseSixtyFour | ||
-- | ||
local T = {} | ||
T.__index = T | ||
|
||
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' | ||
|
||
function T.encode (data) | ||
return ((data:gsub('.', function(x) | ||
local r,b='',x:byte() | ||
for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end | ||
return r; | ||
end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x) | ||
if (#x < 6) then return '' end | ||
local c=0 | ||
for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end | ||
return b:sub(c+1,c+1) | ||
end)..({ '', '==', '=' })[#data%3+1]) | ||
end | ||
|
||
function T.decode (data) | ||
data = string.gsub(data, '[^'..b..'=]', '') | ||
return (data:gsub('.', function(x) | ||
if (x == '=') then return '' end | ||
local r,f='',(b:find(x)-1) | ||
for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end | ||
return r; | ||
end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x) | ||
if (#x ~= 8) then return '' end | ||
local c=0 | ||
for i=1,8 do c=c+(x:sub(i,i)=='1' and 2^(8-i) or 0) end | ||
return string.char(c) | ||
end)) | ||
end | ||
|
||
return T | ||
-- vi: ts=4 sw=4 expandtab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.