svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
ramdiskadm(8)
ramdiskadm(8) System Administration Commands ramdiskadm(8)
NAME
ramdiskadm - administer ramdisk pseudo device
SYNOPSIS
/usr/sbin/ramdiskadm -a name size
/usr/sbin/ramdiskadm -d name
/usr/sbin/ramdiskadm [-h] [--scale[=item1,item2,...]]
DESCRIPTION
The ramdiskadm command administers ramdisk(4D), the ramdisk driver. Use
ramdiskadm to create a new named ramdisk device, delete an existing
named ramdisk, or list information about existing ramdisks.
Ramdisks created using ramdiskadm are not persistent across reboots.
OPTIONS
The following options are supported:
-a name size
Create a ramdisk named name of size size and its corresponding
block and character device nodes.
name must be composed only of the characters a-z, A-Z, 0-9, _ (un‐
derbar), and - (hyphen), but it must not begin with a hyphen. It
must be no more than 32 characters long. Ramdisk names must be
unique.
The size can can be specified in decimal, hexadecimal, or octal no‐
tation. Hexadecimal values are indicated with a 0x prefix, while
octal values start with a leading 0. An optional scale factor suf‐
fix may be specified, representing multiples of 1024 bytes: k, m,
g, t, p, or e, denoting kilobytes, megabytes, gigabytes, terabytes,
petabytes, or exabytes respectively. Alternatively, the scale fac‐
tor b denotes 512 byte blocks. The scale factor can be uppercase or
lowercase. If no scale factor is given, bytes are assumed. The size
of the ramdisk actually created might be larger than that speci‐
fied, depending on the hardware implementation.
If the named ramdisk is successfully created, its block device path
is printed on standard out.
-d name
Delete an existing ramdisk of the name name. This command succeeds
only when the named ramdisk is not open. The associated memory is
freed and the device nodes are removed.
You can delete only ramdisks created using ramdiskadm. It is not
possible to delete a ramdisk that was created during the boot
process.
-h
Prints ramdisk size scaled to a human readable format. The -h op‐
tion is equivalent to using the --scale=max,1024 option.
--scale[=item1,item2,...]
Prints ramdisk size scaled to a human readable format. Scaling is
done by repetitively dividing by 1024, unless otherwise specified.
--scale specified without arguments enables default scaled output,
and is equivalent to --scale=max,1024. See scale(7) for a complete
description of --scale features.
-?
--help
Print usage message and immediately exit.
Without options, ramdiskadm lists any existing ramdisks, their sizes
(in decimal), and whether they can be removed by ramdiskadm (see the
description of the -d option, above).
EXAMPLES
Example 1 Creating a 2MB Ramdisk Named mydisk
# ramdiskadm -a mydisk 2m
/dev/ramdisk/mydisk
Example 2 Listing All Ramdisks
# ramdiskadm
Block Device Size Removable
/dev/ramdisk/miniroot 134217728 No
/dev/ramdisk/certfs 1048576 No
/dev/ramdisk/mydisk 2097152 Yes
EXIT STATUS
ramdiskadm returns the following exit values:
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityCommit‐
ted
SEE ALSO
ramdisk(4D), attributes(7), scale(7)
NOTES
The abilities of ramdiskadm and the privilege level of the person who
uses the utility are controlled by the permissions of /dev/ramdiskctl.
Read access allows query operations, for example, listing device infor‐
mation. Write access is required to do any state-changing operations,
for example, creating or deleting ramdisks.
As shipped, /dev/ramdiskctl is owned by root, in group sys, and mode
0644, so all users can do query operations but only root can perform
state-changing operations. An administrator can give write access to
non-privileged users, allowing them to add or delete ramdisks. However,
granting such ability entails considerable risk; such privileges should
be given only to a trusted group.
Oracle Solaris 11.4 23 September 2022 ramdiskadm(8)