{"id":5109,"date":"2015-08-13T14:19:38","date_gmt":"2015-08-13T06:19:38","guid":{"rendered":"http:\/\/rmohan.com\/?p=5109"},"modified":"2015-08-13T14:19:38","modified_gmt":"2015-08-13T06:19:38","slug":"solaris-run-levels","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5109","title":{"rendered":"Solaris run levels"},"content":{"rendered":"<p>Solaris system state or init states refer to the level of services provided by the system on that specific\u00a0run-level.Normally SVR4 systems has 7 run levels and\u00a0Solaris\u00a0too has that.<br \/>\n<strong><u><br \/>\n<\/u><\/strong><strong><u>(S)tart files, (K)ill files:<\/u><\/strong><\/p>\n<p>In unix ,runlevel will define what are the process need to start in OS startup\u00a0according\u00a0to which run level defined in the \/etc\/inittab file.For\u00a0example,\u00a0in initab if the\u00a0run-level\u00a0mentioned as 3 then the system will start all the start scrips under rc1.d,rc2.d,rc3.d during the system boot.The files which are staring with \u201cS\u201d will start the process .When system is going down it will execute \u201cK\u201d scripts\u00a0according\u00a0to which init command you have used it.<br \/>\n<strong><br \/>\n<\/strong><u><strong>Run Levels-Solaris<\/strong><\/u><\/p>\n<p>table.tableizer-table { border: 1px solid #CCC; font-family: ; font-size: 12px; } .tableizer-table td { padding: 4px; margin: 3px; border: 1px solid #ccc; } .tableizer-table th { background-color: #104E8B; color: #FFF; font-weight: bold; }<\/p>\n<table>\n<tbody>\n<tr>\n<th>Run Level<\/th>\n<th>Init State<\/th>\n<th>Type<\/th>\n<th>Purpose<\/th>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>Power-down state<\/td>\n<td>Power-down<\/td>\n<td>To shut down the operating system so that it is safe to turn off power to the system.<\/td>\n<\/tr>\n<tr>\n<td>s or S<\/td>\n<td>Single-user state<\/td>\n<td>Single-user<\/td>\n<td>To run as a single user with some file systems mounted and accessible.<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>Administrative state<\/td>\n<td>Single-user<\/td>\n<td>To access all available file systems. User logins are disabled.<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>Multiuser state<\/td>\n<td>Multiuser<\/td>\n<td>For normal operations. Multiple users can access the system and all file system. All daemons are running except for the NFS server daemons.<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>Multiuser level with NFS resources shared<\/td>\n<td>Multiuser<\/td>\n<td>For normal operations with NFS resources shared. This is the default run level.<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>Alternative multiuser state<\/td>\n<td><\/td>\n<td>Not configured by default, but available for customer use.<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>Power-down state<\/td>\n<td>Power-down<\/td>\n<td>To shut down the operating system so that it is safe to turn off power to the system. If possible, automatically turns off power on systems that support this feature.<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>Reboot state<\/td>\n<td>Reboot<\/td>\n<td>To shut down the system to run level 0, and then reboot to multiuser level with NFS resources shared (or whatever level is the default in theinittab\u00a0file).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Thanks to\u00a0<a href=\"http:\/\/docs.oracle.com\/\">http:\/\/docs.oracle.com<\/a><\/p>\n<p>To check current run level in\u00a0Solaris\u00a0type the below command.<\/p>\n<p>bash-3.00# who -r<\/p>\n<p>. \u00a0 \u00a0 \u00a0\u00a0run-level 3\u00a0\u00a0Jul 16 01:44 \u00a0\u00a0\u00a0 3 \u00a0\u00a0\u00a0 \u00a00 \u00a0S<\/p>\n<p>run-level 3 \u2013 \u00a0Identifies the current run level<br \/>\nJul 16 01:44 \u2013\u00a0Identifies the date of last run level change<br \/>\n3 \u2013 Also identifies the current run level<br \/>\n0 \u00a0\u2013 Identifies the number of times the system has been at this run level since the last reboot<br \/>\nS \u2013 \u00a0Identifies the previous run level<\/p>\n<p>&nbsp;<\/p>\n<p>Like everything else in a\u00a0Solaris\u00a0system, run levels are defined by files in the filesystem. All the run level files are found in the\u00a0\/etc\u00a0\u00a0directory according to the following table:<br \/>\ntable.tableizer-table { border: 1px solid #CCC; font-family: ; font-size: 12px; } .tableizer-table td { padding: 4px; margin: 3px; border: 1px solid #ccc; } .tableizer-table th { background-color: #104E8B; color: #FFF; font-weight: bold; }<\/p>\n<table>\n<tbody>\n<tr>\n<th>Directoy and runlevels<\/th>\n<\/tr>\n<tr>\n<td>\/etc\/rc0.d Run level 0<\/td>\n<\/tr>\n<tr>\n<td>\/etc\/rc1.d Run level 1<\/td>\n<\/tr>\n<tr>\n<td>\/etc\/rc2.d Run level 2<\/td>\n<\/tr>\n<tr>\n<td>\/etc\/rc3.d Run level 3<\/td>\n<\/tr>\n<tr>\n<td>\/etc\/rc4.d Run level 4<\/td>\n<\/tr>\n<tr>\n<td>\/etc\/rc5.d Run level 5<\/td>\n<\/tr>\n<tr>\n<td>\/etc\/rc6.d Run level 6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>From\u00a0Solaris\u00a010 onwards,<br \/>\nThe \/etc\/inittab file controls the configuration of init; for more\u00a0information refer to init and inittab. \u00a0It is no longer\u00a0necessary to edit inittab directly; administrators should use the<br \/>\nSolaris Service Management Facility (SMF) to define services instead.\u00a0Refer to smf and the System Administration Guide for more\u00a0information on SMF.<\/p>\n<p>In addition, the\u00a0svcadm\u00a0command can be used to change the run level of a system, by selecting a milestone at which to run. The following table shows which run level corresponds to each milestone.<\/p>\n<p><strong>Run Levels and SMF Milestones<\/strong><\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<th>Run Level<\/th>\n<th>SMF Milestone FMRI<\/th>\n<\/tr>\n<tr>\n<td>S<\/td>\n<td>milestone\/single-user:default<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>milestone\/multi-user:default<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>milestone\/multi-user-server:default<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Solaris system state or init states refer to the level of services provided by the system on that specific run-level.Normally SVR4 systems has 7 run levels and Solaris too has that. (S)tart files, (K)ill files:<\/p>\n<p>In unix ,runlevel will define what are the process need to start in OS startup according to which run level [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5109"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5109"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5109\/revisions"}],"predecessor-version":[{"id":5110,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5109\/revisions\/5110"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}