Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Im having "fun" with SMF commands and i have some questions to clear my mind
Im reading that the svcadm is where i can ex. change runlevel, that i can do with the command
$svcadm milestone mileston/single-user
$ who -r
. run-level S Mar 28 19:20 S 0 3
$
Still my ssh connection works, so i try to change back to runlevel 3 with the command
$ svcadmin milestone milestone/multi-user-server
but i still have the singel modus, then i try the
$ init 3
But still singel modus, then i try "init 6" no change
Dont know why that happend
Some other questions is how do i list the default runlevel, guess there is some options for the svcadm command.
Another thing is the processes that is running in the current level, if i change to singel modus and i check "ps -ef" i can still se that the sshd / httpd process is running. I know i cant connect to the processes but why show that they are running ?
If i use the "svcs" i can see that the process is offline, and how can i just start 1 process with the svcadm command.
1. How do i list the default runlevel, guess there is some options for the svcadm command ?
2. How can i just start 1 process with the svcadm command ?
3. What are the advantage of using svc instead of init ?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by linuxtesting2
Ok thats clearing my brain
Still need some info about the following:
1. How do i list the default runlevel, guess there is some options for the svcadm command ?
Quoting the manual page:
The default milestone is defined by the options/milestone property on the master restarter, svc:/system/svc/restarter:default. If this property is absent, "all" is the default.
Quote:
2. How can i just start 1 process with the svcadm command ?
You start a service with the enable [-t] or restart command.
Quote:
3. What are the advantage of using svc instead of init ?
is:3:initdefault used to be in /etc/inittab in solaris until 9. In solaris 10, like the happy "J" said, you are booting into a milestone technically, not a run level. All milestones are online when you boot without any options.
At the ok prompt, you can control which milestone you boot into by typing:
ok boot milestone=all (or single-user/multi-user/multi-user-server/none). Again,
the default is all.
yep, it is a nice transition from legacy run levels to services. fun
You may want to play with services since this is the biggest difference between
10 and previous versions.
Some commands to play with...
svcs -a <- will show you all services and their states
svcadm enable service_name <- enable a service
svcadm disable service_name <- disable a service
svccfg -v import service_name <- import a service into the repository.db
svccfg delete service_name <- take out a service from the repository.db
Not: must be disabled first
svcprop service_name <- list the properties of a service
inetadm -d ftp <- disable ftp
inetadm -e ftp <- enable ftp
inetadm -l ftp <- see the properties of ftp
inetadm -m ftp tcp_trace=TRUE <- modify the tcp_trace property of ftp
inetadm -p <- view properties of inetd
inetadm -M tcp_wrappers=TRUE <- modify one of the inetd properties
These are just examples, have a ball !!!
Location of everything:
/etc/svc/repository.db <- name of the repository/database used for services
/lib/svc/method <- location of the scripts to be executed
/var/svc/manifest <- directory that holds manifests for services (xml files)
Try this for example:
# svccfg [enter]
> list <- list all the services
> select telnet <- select a specific service (telnet in this example)
> listprop <- list the properties of the service
> setprop property_name=value <- change one of the properties of the service
>
is:3:initdefault used to be in /etc/inittab in solaris until 9. In solaris 10, like the happy "J" said, you are booting into a milestone technically, not a run level. All milestones are online when you boot without any options.
At the ok prompt, you can control which milestone you boot into by typing:
ok boot milestone=all (or single-user/multi-user/multi-user-server/none). Again,
the default is all.
Hello,
Concerning Solaris 10, I see that there is the /etc/inittab already there.
Do you agree that if the initdefault (set to a run level of 3) parameter is not in the inittab file, then server may not restart in multi-user mode?
I did an svcs -a on this Solaris 10 machine, and found that the milestones had nearly everything set to default.
You see, my problem is this: I need to configure this machine so that it reboots automatically in multi-user mode. It doesn't at present, and the missing initdefault line in the inittab is what makes me believe that. I checked the solaris documentation (docs.sun.com) and it still talks about the inittab, yet, when I do a man on inittab, the VERY last line tells me that the initdefault parameter is no longer accepted in the solaris10 OS, and that svcadm has replaced this.
So, how then do I make sure that svcadm restarts the server in multiusermode following an init 6 command?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.