システム

The following spacecmd functions are available for use with systems.

1. system_addchildchannels

Add child channels to a system.

usage: system_addchildchannels <SYSTEMS> <CHANNEL ...>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

2. system_addconfigchannels

Add config channels to a system.

usage: system_addconfigchannels <SYSTEMS> <CHANNEL ...> [options]

options:
  -t add channels to the top of the list
  -b add channels to the bottom of the list

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

3. system_addconfigfile

Create a configuration file.

Note this is only for system sandbox or locally-managed files
Centrally managed files should be created via configchannel_addfile
usage: system_addconfigfile [SYSTEM] [options]

options:
  -S/--sandbox : list only system-sandbox files
  -L/--local   : list only locally managed files
  -p PATH
  -r REVISION
  -o OWNER [default: root]
  -g GROUP [default: root]
  -m MODE [defualt: 0644]
  -x SELINUX_CONTEXT
  -d path is a directory
  -s path is a symlink
  -b path is a binary (or other file which needs base64 encoding)
  -t SYMLINK_TARGET
  -f local path to file contents

  Note re binary/base64: Some text files, notably those containing trailing
  newlines, those containing ASCII escape characters (or other charaters not
  allowed in XML) need to be sent as binary (-b).  Some effort is made to auto-
  detect files which require this, but you may need to explicitly specify.

4. system_addcustomvalue

Set a custom value for a system.

usage: system_addcustomvalue KEY VALUE <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

5. system_addentitlements

Add entitlements to a system.

usage: system_addentitlements <SYSTEMS> ENTITLEMENT

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

6. system_addnote

Set a note for a system.

usage: system_addnote <SYSTEM> [options]

options:
  -s SUBJECT
  -b BODY

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

7. system_applyerrata

Apply errata to a system.

usage: system_applyerrata <SYSTEMS> [ERRATA|search:XXX ...]

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

8. system_comparepackageprofile

Compare a system against a package profile.

usage: system_comparepackageprofile <SYSTEMS> PROFILE

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

9. system_comparepackages

Compare the packages between two systems.

usage: system_comparepackages SOME_SYSTEM ANOTHER_SYSTEM

10. system_comparewithchannel

Compare the installed packages on a system with those in the channels it is registered to, or optionally some other channel.

usage: system_comparewithchannel <SYSTEMS> [options]
options:
         -c/--channel : Specific channel to compare against,
                        default is those subscribed to, including
                        child channels

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

11. system_createpackageprofile

Create a package profile.

usage: system_createpackageprofile SYSTEM [options]

options:
  -n NAME
  -d DESCRIPTION

12. system_delete

Delete a system profile.

usage: system_delete <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

13. system_deletenotes

Delete notes from a system.

usage: system_deletenotes <SYSTEM> <ID|*>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

14. system_deletepackageprofile

Delete a package profile.

usage: system_deletepackageprofile PROFILE

15. system_deployconfigfiles

Deploy all configuration files for a system.

usage: system_deployconfigfiles <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

16. system_details

Show the details of a system profile.

usage: system_details <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

17. system_getcrashfiles

Download all files for a crash record.

usage: system_getcrashfiles -c crash_id [--verbose]
usage: system_getcrashfiles -c crash_id [--dest_folder=/tmp/crash_files] [--verbose]

18. system_installpackage

Install a package on a system.

usage: system_installpackage <SYSTEMS> <PACKAGE ...>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

19. system_list

List all system profiles.

usage: system_list

20. system_listbasechannel

List the base channel for a system.

usage: system_listbasechannel <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

21. system_listchildchannels

List the child channels for a system.

usage: system_listchildchannels <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

22. system_listconfigchannels

List the config channels of a system.

usage: system_listconfigchannels <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

23. system_listconfigfiles

List the managed config files of a system.

usage: system_listconfigfiles <SYSTEMS>'
options:
  -s/--sandbox : list only system-sandbox files
  -l/--local   : list only locally managed files
  -c/--central : list only centrally managed files
  -q/--quiet   : quiet mode (omits the header)

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

24. system_listcrashesbysystem

List all reported crashes for a system.

usage: system_listcrashesbysystem -i sys_id

25. system_listcustomvalues

List the custom values for a system.

usage: system_listcustomvalues <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

26. system_listentitlements

List the entitlements for a system.

usage: system_listentitlements <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

27. system_listerrata

List available errata for a system.

usage: system_listerrata <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

28. system_listevents

List the event history for a system.

usage: system_listevents <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

29. system_listhardware

List the hardware details of a system.

usage: system_listhardware <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

30. system_listinstalledpackages

List the installed packages on a system.

usage: system_listinstalledpackages <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

31. system_listnotes

List the available notes for a system.

usage: system_listnotes <SYSTEM>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

32. system_listpackageprofiles

List all package profiles.

usage: system_listpackageprofiles

33. system_listupgrades

List the available upgrades for a system.

usage: system_listupgrades <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

34. system_lock

Lock a system.

usage: system_lock <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

35. system_reboot

Reboot a system.

usage: system_reboot <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

36. system_removechildchannels

Remove child channels from a system.

usage: system_removechildchannels <SYSTEMS> <CHANNEL ...>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

37. system_removeconfigchannels

Remove config channels from a system.

usage: system_removeconfigchannels <SYSTEMS> <CHANNEL ...>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

38. system_removecustomvalues

Remove a custom value for a system.

usage: system_removecustomvalues <SYSTEMS> <KEY ...>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

39. system_removeentitlement

Remove an entitlement from a system.

usage: system_removeentitlement <SYSTEMS> ENTITLEMENT

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

40. system_removepackage

Remove a package from a system.

usage: system_removepackage <SYSTEMS> <PACKAGE ...>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

41. system_rename

Rename a system profile.

usage: system_rename OLDNAME NEWNAME

42. system_runscript

Schedule a script to run on the list of systems provided.

usage: system_runscript <SYSTEMS> [options]

options:
  -u USER
  -g GROUP
  -t TIMEOUT
  -s START_TIME
  -l LABEL
  -f FILE

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL


Dates can be any of the following:
Explicit Dates:
Dates can be expressed as explicit date strings in the YYYYMMDD[HHMM]
format.  The year, month and day are required, while the hours and
minutes are not; the hours and minutes will default to 0000 if no
values are provided.

Deltas:
Dates can be expressed as delta values.  For example, '2h' would
mean 2 hours in the future.  You can also use negative values to
express times in the past (e.g., -7d would be one week ago).

Units:
s -> seconds
m -> minutes
h -> hours
d -> days

43. system_schedulehardwarerefresh

Schedule a hardware refresh for a system.

usage: system_schedulehardwarerefresh <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

44. system_schedulepackagerefresh

Schedule a software package refresh for a system.

usage: system_schedulepackagerefresh <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

List systems that match the given criteria.

usage: system_search QUERY

Available Fields:
id
name
ip
hostname
device
vendor
driver
uuid

Examples:
> system_search device:vmware
> system_search ip:192.168.82

46. system_setbasechannel

Set a system’s base software channel.

usage: system_setbasechannel <SYSTEMS> CHANNEL

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

47. system_setconfigchannelorder

Set the ranked order of configuration channels.

usage: system_setconfigchannelorder <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

48. system_setcontactmethod

Set the contact method for a given system.

Available contact methods: ['default', 'ssh-push', 'ssh-push-tunnel']
usage: system_setcontactmethod <SYSTEMS> <CONTACT_METHOD>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

49. system_show_packageversion

Shows version of installed package on a given system.

usage: system_show_packageversion <SYSTEM> <PACKAGE>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

50. system_syncpackages

Sync packages between two systems.

usage: system_syncpackages SOURCE TARGET

51. system_unlock

Unlock a system.

usage: system_unlock <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

52. system_updatecustomvalue

Update a custom value for a system.

usage: system_updatecustomvalue KEY VALUE <SYSTEMS>

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL

53. system_upgradepackage

Upgrade a package on a system.

usage: system_upgradepackage <SYSTEMS> <PACKAGE ...>|*

<システム> は下記のいずれかを指定できます:
name
ssm ('help ssm' を参照)
search:QUERY ('help system_search' を参照)
group:GROUP
channel:CHANNEL