Skip to content

Commit

Permalink
Issue #147: finish up the pass for writing gs command man pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed Feb 9, 2015
1 parent 9f23739 commit 79d0475
Show file tree
Hide file tree
Showing 30 changed files with 417 additions and 198 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
gs
gs
<topezCommand: 'gs' manPage: #'gsManPage'>
^ [ :topez :objIn :tokens :command | self performSubCommand: topez objIn: objIn todeCommand: command ]
^ [ :topez :objIn :tokens :command |
self
performSubCommand: topez
objIn: objIn
commandOptions: {#('help' $h #'none')}
todeCommand: command ]
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@ DESCRIPTION
Commands:
configuration Gem and Stone configuration reports
fileout Fileout Classes, Categories or Packages
halt Halt on AlmostOutOfMemory exception
fileSizeReport
fileSizeReport Report on repository size and amount of free space
gemtools Emulate GemTools Launcher Menus
halt Halt on AlmostOutOfMemory exception
instances
mfc
mfc Perform a Mark for Collection
mreferences
objectAudit
objectFor
objectFor Resolve an object from given objectId
references
sessionDescription
sessionReport
version
sessionDescription Session information report
version OS, hardware and GemStone version attributes for Client, Gem, or Stone
Use `gs --help <command>` to read about a specific subcommand.
Expand All @@ -42,22 +41,45 @@ EXAMPLES
gs --help
gs --help mfc
gs gemtools
gs configuration --gem
gs configuration --stone
gs fileout --directory=/tmp/fileouts --category Metacello-Core-Scripts metacello-scripts.gs
gs fileout --directory=/tmp/fileouts --class TDGemStoneTool gstool.gs
gs fileout --directory=/tmp/fileouts --package Tode-GemStone-Server-Tests tests.gs
gs fileSizeReport
gs gemtools
gs halt -m=65
gs halt -almostOutOfMemory=65
gs mfc
gs mfc --noCommit
gs mfc --threads=3 --wait=120 --cpu=40
gs mfc --buffer=256
gs objectFor
gs sessionDescription
gs sessionDescription 5
gs sessionDescription --all
gs version
gs version --client
gs version --gem
gs version --stone
'.
manPage subCommands
at: 'gemtools' put: self gsgemtoolsManPage;
at: 'configuration' put: self gsconfigurationManPage;
at: 'fileout' put: self gsfileoutManPage;
at: 'halt' put: self gshaltManPage;
at: 'fileSizeReport' put: self gsfileSizeReportManPage;
at: 'mfc' put: self gsmfcManPage;
at: 'objectFor' put: self gsobjectForManPage;
at: 'sessionDescription' put: self gssessionDescriptionManPage;
at: 'version' put: self gsversionManPage;
yourself.
^ manPage

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
gs
gsfileSizeReportManPage
| manPage |
manPage := TDManPage
commandName: 'fileSizeReport'
fromString:
'NAME
gs fileSizeReport - Report on repository size and amount of free space
SYNOPSIS
gs fileSizeReport
DESCRIPTION
Opens editor on a string which reports on the name, size, and amount of free space
for each extent and the size and free space of the entire logical Repository.
EXAMPLES
gs fileSizeReport
'.
^ manPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
gs
gsmfcManPage
| manPage |
manPage := TDManPage
commandName: 'mfc'
fromString:
'NAME
gs mfc - Perform a Mark for Collection
SYNOPSIS
gs mfc [--noCommit] [--threads=<maxThreads>] [--wait=<wait-seconds>]
[--buffer=<page-buffer-size>] [--cpu=<percent-cpu-active-limit>]
DESCRIPTION
Perform a garbage collection analysis of all permanent objects on disk.
Every object in the receiver that cannot be reached from AllUsers is marked
for subsequent reclaiming of storage space.
This command commits the current transaction (unless the --noCommit option
is specified), empties the GcCandidates queue and commits, runs the analysis
while outside of a transaction and then reenters a transaction if the session
was in a transaction at the start of this method. If an abort would cause unsaved
changes to be lost, it does not execute and signals an error, #rtErrAbortWouldLoseData.
For additional information see the comments in the following methods:
browse method --spec Repository>>markForCollection \
Repository>>_mfcWithMaxThreads:waitForLock:pageBufSize:percentCpuActiveLimit:
OPTIONS
--buffer=<page-buffer-size>
By default, the <page-buffer-size> is 128. The <page-buffer-size>, which must be a
power of two, specifies the number of pages to buffer per thread. This parameter in
conjunction with the <maxThreads> largely determines the memory footprint needed to
perform this operation.
--cpu=<percent-cpu-active-limit>
By default, the <percent-cpu-active-limit> is 90. The <percent-cpu-active-limit>
specifies a level of total cpu activity at which the algorithm automatically
inactivates threads to prevent overload of system resources.
--noCommit
By default, this command performs a commit. If the --noCommit option is specified,
then an abort is performed instead as the mfc must start with no dirty objects in
the vm.
--threads=<maxThreads>
By default, the <maxThreads> is 1. The <maxThreads> argument specifies the maximum
number of slave sessions (threads) that can be used during the operation.
--wait=<wait-seconds>
By default the <wait-seconds> is 60. The <wait-seconds> is used to specify how many
seconds the method should wait while attempting to acquire the gcLock. No other
garbage collection operations may be started or in progress while this method is
running. There also must be no outstanding possible dead objects in the system for
the GC lock to be granted.
EXAMPLES
gs mfc
gs mfc --noCommit
gs mfc --threads=3 --wait=120 --cpu=40
gs mfc --buffer=256
'.
^ manPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
gs
gsobjectForManPage
| manPage |
manPage := TDManPage
commandName: 'objectFor'
fromString:
'NAME
gs objectFor - Resolve an object from given objectId
SYNOPSIS
gs objectFor <object-id>
DESCRIPTION
Return the object with the given <object-id>, or nil if no such
object exists. The <object-id> may specify a special object.
EXAMPLES
gs objectFor
'.
^ manPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
gs
gssessionDescriptionManPage
| manPage |
manPage := TDManPage
commandName: 'sessionDescription'
fromString:
'NAME
gs sessionDescription - Session information report
SYNOPSIS
gs sessionDescription [--all]|[<session-id>]
DESCRIPTION
Return a dictionary with a variety of information about the given <session-id>.
By default, returns the session description for the current session.
With the --all option, a dictionary of session description dictionaries is returned, keyed
by session id.
Here''s a summary of the information in each session description dictionary:
1. The UserProfile of the session; nil if the UserProfile is recently
created and not visible from this session''s transactional view
or the session is in login or processing, or has logged out.
2. A SmallInteger, the process ID of the Gem or topaz -l process .
3. The hostname of the machine running the Gem process. Specifically,
the peer''s hostname as seen by stone, for the gem to stone network
connection used for login.
(a String, limited to 127 bytes).
4. Primitive number in which the Gem is executing, or 0 if it is not executing
in a long primitive.
5. Time of the session''s most recent beginTransaction, commitTransaction, or
abortTransaction (from System timeGmt).
6. The session state (a SmallInteger).
7. A SmallInteger whose value is -1 if the session is in transactionless mode,
0 if it is not in a transaction and 1 if it is in a transaction.
8. A Boolean whose value is true if the session is currently referencing the
oldest commit record, and false if it is not.
9. The session''s serial number (a SmallInteger).
10. The session''s sessionId (a SmallInteger).
11. A String containing the ip address of host running the GCI process.
If the GCI application is remote, the peer address as seen by
the gem of the GCI app to gem network connection.
If the GCI application is linked (using libgcilnk*.so or gcilnk*.dll)
this is the peer''s ip address as seen by stone, for the gem to
stone network connection used for login.
12. The priority of the session (a SmallInteger).
13. Unique host ID of the host where the session is running (an Integer)
14. Time of the session''s most recent request to stone (from System timeGmt)
15. Time the session logged in (from System timeGmt)
16. Number of commits which have occurred since the session obtained its view.
17. Nil or a String describing a system or gc gem .
18. Number of temporary (uncommitted) object IDs allocated to the session.
19. Number of temporary (non-persistent) page IDs allocated to the session.
20. A SmallInteger, 0 session has not voted, 1 session voting in progress,
2 session has voted, or voting not active.
21. A SmallInteger, processId of the remote GCI client process,
or -1 if the session has no remote GCI client .
EXAMPLES
gs sessionDescription
gs sessionDescription 5
gs sessionDescription --all
'.
^ manPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
gs
gsversionManPage
| manPage |
manPage := TDManPage
commandName: 'version'
fromString:
'NAME
gs version - OS, hardware and GemStone version attributes for Client, Gem, or Stone
SYNOPSIS
gs version [--client|--gem|--stone]
DESCRIPTION
Return a StringKeyValueDictionary whose keys are the names of operating system,
hardware, or GemStone version attributes, and whose values are the current values
of those attributes for the current client, gem, or stone.
OPTIONS
--client
Return attribute dictionary for client GemBuilder for C process.
--gem
Return attribute dictionary for Gem process.
--stone
Return attribute dictionary for Stone process.
EXAMPLES
gs version
gs version --client
gs version --gem
gs version --stone
'.
^ manPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
as yet unclassified
gsFileSizeReportOn: aStream
"
gs fileSizeReport
"

| repositoryFiles stats |
repositoryFiles := SystemRepository fileNames.
stats := SystemRepository _extentStatistics: -1.
1 to: SystemRepository numberOfExtents do: [ :i |
| extentFile |
extentFile := repositoryFiles at: i.
aStream
nextPutAll: 'Extent #' , i asString;
cr;
nextPutAll: ' Filename = ' , extentFile;
cr;
nextPutAll:
' File size = '
, (SystemRepository numToMByteString: ((stats at: i) at: 1));
cr;
nextPutAll:
' Space available = '
, (SystemRepository numToMByteString: ((stats at: i) at: 2));
cr;
yourself ].
aStream
nextPutAll: 'Totals';
cr;
nextPutAll:
' Repository size = '
, (SystemRepository numToMByteString: SystemRepository fileSize);
cr;
nextPutAll:
' Free Space = '
, (SystemRepository numToMByteString: SystemRepository freeSpace);
cr;
yourself

This file was deleted.

This file was deleted.

Loading

0 comments on commit 79d0475

Please sign in to comment.