- •Alexandre Borges
- •Credits
- •Introduction 74
- •Chapter 3: Networking 159
- •Free access for Packt account holders
- •Instant updates on new Packt books
- •Table of Contents Preface 1 Chapter 1: ips and Boot Environments 7
- •Introduction 8
- •Installing a package, verifying its content, and fixing the package corruption 13
- •In an inactive boot environment 64
- •Chapter 2: zfs 73
- •Chapter 4: Zones 235
- •Preface
- •Questions
- •Ips and Boot
- •In this chapter, we will cover the following topics:
- •Introduction
- •Determining the current package publisher
- •Getting ready
- •Installing a package, verifying its content, and fixing the package corruption
- •Getting ready
- •Interface
- •Getting ready
- •Listing and renaming a boot environment
- •Getting ready
- •Configuring an ips local repository
- •Getting ready
- •Configuring a secondary ips local repository
- •Getting ready
- •Publishing packages into a repository
- •Getting ready
- •Adding big applications into a repository
- •Getting ready
- •Creating your own package and publishing it
- •Getting ready
- •Managing an ips publisher on Solaris 11
- •Getting ready
- •Pinning publishers
- •Getting ready
- •Getting ready
- •Creating a mirror repository
- •Getting ready
- •Getting ready
- •Listing and creating a boot environment
- •Getting ready
- •Getting ready
- •Activating a boot environment
- •Getting ready
- •Getting ready
- •References
- •Introduction
- •Creating zfs storage pools and filesystems
- •Getting ready
- •Playing with zfs faults and properties
- •Getting ready
- •Creating a zfs snapshot and clone
- •Getting ready
- •Performing a backup in a zfs filesystem
- •Getting ready
- •Handling logs and caches
- •Getting ready
- •Managing devices in storage pools
- •Getting ready
- •Configuring spare disks
- •Getting ready
- •Handling zfs snapshots and clones
- •Getting ready
- •Playing with comstar
- •Getting ready
- •Mirroring the root pool
- •Getting ready
- •Zfs shadowing
- •Getting ready
- •Configuring zfs sharing with the smb share
- •Getting ready
- •Setting and getting other zfs properties
- •Getting ready
- •Playing with the zfs swap
- •Getting ready
- •References
- •Networking
- •Introduction
- •Playing with Reactive Network Configuration
- •Getting ready
- •Internet Protocol Multipathing
- •Getting ready
- •Setting the link aggregation
- •Getting ready
- •Configuring network bridging
- •Getting ready
- •Getting ready
- •Configuring the dhcp server
- •Getting ready
- •Configuring Integrated Load Balancer
- •Getting ready
- •IPv4 forwarding enabled enabled
- •References
- •Introduction
- •Getting ready
- •Id name status path brand ip
- •Getting ready
- •Value is basic (only the owner can modify it).
- •22:52:06 5849 Rcapd
- •Implementing a flow control
- •Getting ready
- •Getting ready
- •Installing: This may take several minutes...
- •References
- •Playing with Oracle
- •Introduction
- •Reviewing smf operations
- •Getting ready
- •Its dependencies
- •Handling manifests and profiles
- •Getting ready
- •Creating smf services
- •Getting ready
- •Getting ready
- •Troubleshooting Oracle Solaris 11 services
- •Getting ready
- •References
- •Configuring and
- •Introduction
- •Getting ready
- •References
- •Configuring and
- •Introduction
- •Configuring and using rbac
- •Getting ready
- •Playing with least privileges
- •Getting ready
- •References
- •Administering and
- •Introduction
- •Monitoring and handling process execution
- •Getting ready
- •2014 May 4 19:25:10, load average: 0.38, 0.30, 0.28 syscalls: 12648
- •Managing processes' priority on Solaris 11
- •Getting ready
- •Configuring fss and applying it to projects
- •Getting ready
- •References
- •Isbn-13: 978-0131568198
- •Configuring the
- •Introduction
- •Configuring the syslog
- •Getting ready
- •Getting ready
- •References
- •Aggregation 191
- •Identifier (fmri) 294 faults, zfs
- •(Trill) 198
- •Values, l4 (Communication)
- •Virtual ip address (vip address) 228 virtual memory size (vsz) 396 virtual network interface (vnic) 238 virtual network, zone
- •Virtual to virtual (v2v) migration 280
- •About Packt Enterprise
- •Writing for Packt
2014 May 4 19:25:10, load average: 0.38, 0.30, 0.28 syscalls: 12648
PROCESS COUNT
isapython2.6 20
sendmail 20
dhcpd 24
httpd.worker 30
updatemanagernot 40
nautilus 42
xscreensaver 50
tput 59
-
gnome-settings-d metacity
62
75
Chapter 8
VBoxService
81
ksh93
118
clear
163
poold
201
pkg.depotd
615
VBoxClient
781
java
1249
gnome-terminal
2224
dtrace
2712
Xorg
3965
An overview of the recipe
You learned how to monitor processes using several tools such as prstat, ps, and dtrace. Furthermore, you saw several commands that explain how to control and analyze a process.
Managing processes' priority on Solaris 11
Oracle Solaris 11 allows us to change the priority of processes using the priocntl command
either during the start of the process or after the process is run.
Getting ready
This recipe requires a virtual machine (VirtualBox or VMware) running Oracle Solaris 11 with 2 GB RAM at least. It is recommended that the system have more than one processor or core.
How to do it…
In the Introduction section, we talked about scheduling classes and this time, we will see more information on this subject. To begin, list the existing and active classes by executing the following command:
root@solaris11-1:~# priocntl -l
CONFIGURED CLASSES
==================
SYS (System Class)
Administering and Monitoring Processes
TS (Time Sharing)
Configured TS User Priority Range: -60 through 60 SDC (System Duty-Cycle Class)
FSS (Fair Share)
Configured FSS User Priority Range: -60 through 60
FX (Fixed priority)
Configured FX User Priority Range: 0 through 60
IA (Interactive)
Configured IA User Priority Range: -60 through 60
RT (Real Time)
Configured RT User Priority Range: 0 through 59
When handling priorities, which we learned in this chapter, only the positive part is important and we need to take care because the values shown in the previous output have their own class as the reference. Thus, they are not absolute values.
To show a simple example, start a process with a determined class (FX) and priority (55) by executing the following commands:
root@solaris11-1:~# priocntl -e -c FX -m 60 -p 55 gcalctool
root@solaris11-1:~# ps -efcl | grep gcalctool
-
0 S
pts/1
root 2660 2646 FX
0:01 gcalctool
55
?
33241
? 04:48:52
0 S pts/2
root 2664 2661 FSS
0:00 grep gcalctool
22
?
2149
? 04:50:09
As can be seen previously, the process is using exactly the class and priority that we have chosen. Moreover, it is appropriate to explain some options such as -e (to execute a specified command), -c (to set the class), -p (the chosen priority inside the class), and -m (the maximum limit that the priority of a process can be raised to).
Chapter 8
The next exercise is to change the process priority after it starts. For example, by executing the following command, the top tool will be executed in the FX class with an assigned priority equal to 40, as shown in the following command:
root@solaris11-1:~# priocntl -e -c FX -m 60 -p 40 top
root@solaris11-1:~# ps -efcl | grep top
-
0 S
pts/3
root 2662 2649
0:00 top
FX
40
?
1112
?
05:16:21
0 S pts/2
root 2664 2606
0:00 grep top
IA
33
?
2149
?
05:16:28
Then, to change the priority that is running, execute the following command:
root@solaris11-1:~# priocntl -s -p 50 2662
root@solaris11-1:~# ps -efcl | grep top
-
0 S pts/3
root 2662 2649
0:00 top
FX
50
?
1112
?
05:16:21
0 S pts/2
root 2667 2606
0:00 grep top
IA
55
?
2149
?
05:17:00
This is perfect! The -s option is used to change the priorities' parameters, and the –p option
assigns the new priority to the process.
If we tried to use the TS class, the results would not have been the same because this test system does not have a serious load (it's almost idle) and in this case, the priority would be raised automatically to around 59.
An overview of the recipe
You learned how to configure a process class as well as change the process priority at the start and during its execution using the priocntl command.
