You are on page 1of 22




   
 
   
 
 
    
 

  

  !"  #
$ 
  %

  
  
   


%


      
 
#& 
  
 






#
'  
 
 
(((# 


(
(# 
 

     
  

  
#)
 

    
   



  


  
  
  
#
*
 
#




  
 #



             
      
  
 
 

     
 
     
 
  
     
    


  
     

     
 !"#  $ 

 
      
 

  
  %
   
    
 

    

   !"
 #   
  

&           
'()*  #  

  
&              #    
   
   
 !" 
 $+,-.
 

 
/  !"

"0 

"01"0  
2 1 %
  311
2 1 %
  311


+ 4







  


 


 
 



 

 

 !
 
   
   
    

               
   !    
" 
      #  !  
 "

 $
$
%&'()*#
"##$
 
  %&


 




  
 

'( '(
 

%  

 


 )
*!

   "  
  + "!    
            , !      
  
           +
 
"

          

-      !


  

".

           
      "   
  "!!   
  
          "  
"      
      "  
 !
    
     "     
 
+ "!""      

+!

  "      / !    !     
0
1    21"  2
3       4  44 
4  4 
44 4 
!
     
0
 % 1 1 11 1 1 11
 %

,!
Ordinary or Regular File
d Directory
c Character special file
b Block special file
l Symbolic link
p Named pipe
s Socket
17)

/proc is a Virtual filesystem which does not reside on a disk, but it resides on system
memory (RAM). The files and directories in this filesystem are used by system to register
processes they run and also the setting (tunables) of the operating systems get loaded from
the disk to the /proc filesystem when teh system boots up, so that the system doesnt have
to reach to the disk everytime it has to read some setting or values.
It Also holds some real time statistical information such as process ID's cpu memory and IO
stats and kernel Values. This filesystem is useful for users to read/fetch data , when they
need to read some values from the kernel.
-!
 
.!

1) what is core file.


It is a file that contains a core dump. Certain abnormal program terminations such as
executing an illegal instruction cause a core dump to be generated by default.
2) where it is located.
Usually it is a file called   in whatever was the current directory of the process that
caused it to be generated, but in some operation systems like Linux it is possible to
reconfigure this so that it is saved to a different file, or so that it is piped to a program. For

Linux, looks in 1 11 1 5


  to find the name of the file in which core dumps
will be placed.
3) what is the use of core fie.
A core dump can be loaded into a debugger like gdb. This enables examining the state of
the program just as it was when it got terminated. It can come in handy for the developer to
determine why the program crashed.
/!
coreadm
"   3 !" coreadm
 
  "       
  " 
  "      
 "       
  " 5   
    
 "
6%'


  , 
              
              
  


 

 
0 
$ 
0 11$1//2!
3
 
1 1 1$

3
 
3
 

dumpadm
"    
    " 
dumpadm       
 
  !

 !
 
  "  
 
  


4!

Background Process
Unlike with a foreground process, the shell does not have to wait for a background
process to end before it can run more processes. Within the limit of the amount of
memory available, you can enter many background commands one after another.
To run a command as a background process, type the command and add a space and
an ampersand to the end of the command. For example:

$ command1 &
Immediately after entering the above command, the shell will execute the command.
While that is running in the background, the shell prompt (% for the C Shell, and $ for
the Bourne Shell and the Korn Shell) will return. At this point, you can enter another
command for either foreground or background process. Background jobs are run at a
lower priority to the foreground jobs.
You will see a message on the screen when a background process is finished running.

Foreground Process
A foreground process is different from a background process in two ways:
1. Some foreground processes show the user an interface, through which the user can
interact with the program.
2. The user must wait for one foreground process to complete before running another
one.
To start a foreground process, enter a command at the prompt, e.g.,
$ command1
24)
Ctrl+c-to come out from process
Ctrl+z-to come out of memory
25)
Kill -2 and ctrl+c are same
26)
Jobs:
6

  7 
8  4
&     #  
   )6 
   7
 

27)

5



6
#7
 $
28% 
!%




%
 
$9

 

:7

%
 $ 7
% 





  

-!

 
 
   
 
   
   


#

  
    
   

 
 

 
  9  
#9 
    7    
 
:
.!
4/!
; 
 ////
; 
 ////
; 
 ////  .+..++/
; 
 ////
; 
 ////

4!


 
  7'      5   "     
 
! 

    
   5 " 
 
 
  
&6'

(



  
 

  
 


(  


 

   
  <

6
  % 
 %  
  % 
  

(

 



 
    
( 
 


  
(
 

 =
  % 
$
 
  %
6
  %
     
<
   
 
  
 


     2
 2+!!>

   
   
  
(      

44!
?


4*!
@
 
(
%


  A
A 1

4+!

?1 1 1



4,!
11 1

4B!
3



4-!
89 
5" ! 8!  
 "        


 #   +#  
  4  
0  

       8  !
       

             
  
  
 

     


"
"   
&:'

 

  



  


 
  
 

 

 
 ! 

    
"#  $ 


    "
  
 






%&!
'
&()
*
()) 
+,
%-!
+,
%.!
  
      "         
  
 
 
      !  

   
    

!
    .+-+
"  
%/!
*,
*
 

  

*,
* 
%0!

 
 
  

  # 


 


  
       
 
 
 9 9
  #  
    
  
   
 #


 
 
%1!

23  4
%5!
  


 
 

#26

%'! 7
 "  
) ) 
(.) )
%8!

.(- 


0&!
*
2 
0-!

 
 
0.!0/!0%!
 
))
" 
 9
: 


 
  ) )! 


  
 

)")  -;!! 
<

 =

 

 
  !
 
> 

))
" 

& 1 
?&0
 1

 

   ?./
 %




"
  




7  
'     !  
      
 
  
      
7  
'    
     
 
     
     
 
  

  !         
 
 

  !        
 

 
    

@  A6

@   6

1&!
   
     
    
<
% %%%%%% @ 
# #
    <
  > %  %%% @ 
# #
   
    <
  >> 


     
      

 
    
A  
 


 
  

 
<

 % <
< 
"


7     
 ' 
   "   
   
8;/
+   )
))   .  .7  

   5  '
B
 

1.!

   



  

1/!1%!
The /etc/syslog.conf file controls where messages are logged.

10!
/etc/named.conf
/etc/resolv.conf

66)
If u want to ping any user by his/her hostname u need to save ip address and his/her
hostname in this file.
/etc/hosts file contain the ip address as well as the hostname
67)  
  
          

       "  


 # "          
# 
<  


#    =&&
    =66
>?'
4  
>:'
@ vmstat
     "   
     "  
+; 
! !     !
     !
" vmstat


"    !  !


    
A='
5B
5B
A%'
 
% 
    " 
6#   "        "      

  
6#   
  
 " 

% 
      
6+<     C
  7="  '
&9 " 
 " 
0
% 
      
6+    C
  
&9 " 
 " 
DE
     

F;  
 
     

5.!
C
 

   


 

5/!

11 
   

 
           

   < 
  
 #  
#
    

 
 

 )    
 
11    

    
     

5%!


)) )" .%
 

)
)"9))"9)) )"9)) )"9)9))"9)) )"
9))"
 

)")"

  
" .%
50!

#      +-)! "0

global# pkgadd -d /cdrom/cdrom0/directory -G package_name

#      


  "    
! "0

global# pkgadd -d disk1/image -G package_name

       




9   G!  pkgadd-d


 
"    
 


#      +-)! "0

global# pkgadd -d /cdrom/cdrom0/directory package_name




#      


  "    
! "0

global# pkgadd -d disk1/image package_name




       




           



!pkginfo 
  
"

global% pkginfo package_name

51!

   0

  #


# 

       "  H #!  

! G
!

   

      
    
  !      
  
  

        
 
G! 

! " 

$
    

 "  "


  !"      
   
 
 -*
+ 7)  ' 



     
  !         
!!  
  ! " "

     !   
  " 
"  -*+      
!    "     
 "  
   I-*+ 
   
    5   @  
   !   "

% 
&

 

#    
!
        5     
    7+/#'
5
   "    H #   ! 
   

%F!  
 
  
   
 
   
 

    


'  

7 'B3   7    '! 
 !    #  
   


 
!  "  
   
(
7  'B3         
  
 
     
        
 
 !
  !  
      
  
 
 

)
 

7 'B3 
"      

55!
D) ) )- 5
  -& &5

5'!
;-)) ) ;-)) ) .
E
>6
)) ) -)) ) .

E
>6

E
>6
)>6

58!



>
F
'&!
-
 7-*+'  "            
 "
  
  root *""  "    
  !-*+

  
   
     ;       
     
     
  -*+
*  
+                 


 3 ! " "        
solaris.device.cdrw  G    G    

  +-)

 3      G ! /etc/security/auth_attr 

% +
        
 
! ! ! " ;  
  
3 ! proc_exec    execve()- 
    "    !  ppriv -vl basic


   +          # "  E#8
  ! "                

  
 3 !setuid
setgid   "  # -*+
!
  G 
    "   

 setuid
setgid  
   
  3 !  
solaris.device.allocate  G  
    ;  

 3 !   file_flag_set     !
 ! 
"   
%   
+   
  
"  " 
    # "  E#8  
  -*+
!    
setuid
setgid   
  # -*+
!         
  G  
   
  3      !;  
  

-*+

  +   "     


       
   
  G !
 " 
  !
  "  !
  
   ;            
  "    -    
    "   "  

+ 
 "      
   
 "
"
 
 "#"     " ! 
 root !    "
5     
  
 
   3 !   " ! " 



" " 
 

" 
          "
 
-    
3 !" 
 
  
       

  + "   3  !   !"  ! " !



'-!=
 )  

 "
'.!
C,"
< 

'/!


   
  
'%!
)) 

 

'0!

   
 
 ,
 
'1!
G

 

: 
 


'5!
       35 " ! "   0
$ man mount_ufs
3 !      (35 " ! "   0
$ man zfs

fstyp

     "  "


H


 )
)

'8!

' ,  


 nsswitch.conf
  
      
       

        

  0

hosts
netmasks
ethers
 
bootparams
protocols
services
networks

/etc/nsswitch.conf 
   
     
 ) 5    
    
  /etc/nsswitch.conf    " !
   " 
 

      # " 


 JEK ! 
      

:%'

I+

8.!
I))")"
 
 
"

8/!
+""
 


8%!







 

+ $  
#
,



   

 


 
     
   
        #
!
 -
     
-
 
 
 
#
,
 
my-zone
  
 


#
global# zonecfg -z my-zone

. 

 
 
 -
 


  

 
/

my-zone: No such zone configured


Use 'create' to begin configuring a new zone.

0



-
   #
, 




 
 #

zonecfg:my-zone> create

!

-
  /export/home/my-zone  

#
zonecfg:my-zone> set zonepath=/export/home/my-zone

"  

zonepath 1)!



! 2323(34


#
!

  
#
.
true
-
   


 -

#5
 

-
 
-


svc:/system/zones:default 


#,


  
false#

zonecfg:my-zone> set autoboot=true

!


 
 -
#

zonecfg:my-zone> set bootargs="-m verbose"

"
 

0+ -
#

zonecfg:my-zone> add dedicated-cpu

# !

 
0+#

zonecfg:my-zone:dedicated-cpu> set ncpus=1-2

# 6& 7!

 
#

zonecfg:my-zone:dedicated-cpu> set importance=10

# ,

 1#
# 8 

  #

zonecfg:my-zone:dedicated-cpu> end





 


#

zonecfg:my-zone> set limitpriv="default,sys_time"

, 
 
 




 


#
!


  FSS#
zonecfg:my-zone> set scheduling-class=FSS

$ 
 #

zonecfg:my-zone> add capped-memory

# !


 #

zonecfg:my-zone:capped-memory> set physical=50m

# !

 
 #

zonecfg:my-zone:capped-memory> set swap=100m

# !



 #

zonecfg:my-zone:capped-memory> set locked=30m

# 8 

 
  #

zonecfg:my-zone:capped-memory> end

$ 

#

zonecfg:my-zone> add fs

# !

  


/usr/local  

#
zonecfg:my-zone:fs> set dir=/usr/local

# !
 /opt/zones/my-zone/local 
 -

 

/usr/local 
-

  
#
zonecfg:my-zone:fs> set special=/opt/zones/my-zone/local

# . 
  9 -

/usr/local

 

 
   
#
# !




lofs  

#
zonecfg:my-zone:fs> set type=lofs

# ,

  
  


 
   


#
# 8 



  #

zonecfg:my-zone:fs> end

, 
 



  
 
 


#
6& 7!

hostid#
zonecfg:my-zone> set hostid=80f0c086

$ 1)!  
 
  
 
 #

zonecfg:my-zone> add dataset

# !

  
1)!  
 #

zonecfg:my-zone> set name=tank/sales

# 8 
dataset
  #
zonecfg:my-zone> end

6! 
1
& 7$  


  9 

 
-
#
"
 


  
-
  
  
  



#!


  
-
 "! 

:

#

zonecfg:my-zone> add inherit-pkg-dir

# !
 /opt/sfw 
 -

 
 
9 
 
-


  
#
zonecfg:my-zone:inherit-pkg-dir> set dir=/opt/sfw


 

# ,
-
%      
 



  
#,



 




 

-
 

  
 zoneadm#


# 8 
inherit-pkg-dir
  #
zonecfg:my-zone:inherit-pkg-dir> end

, 
 



  
 
 
 


#



. 

  
-

  




 




 inherit-pkg-dir




 inherit-pkg-dir


 zonecfg  
-
/
zonecfg:my-zone>remove inherit-pkg-dir dir=/lib
zonecfg:my-zone>remove inherit-pkg-dir dir=/platform
zonecfg:my-zone>remove inherit-pkg-dir dir=/sbin
zonecfg:my-zone>remove inherit-pkg-dir dir=/usr

6& 7. 

  

9.+-


ip-type#
zonecfg:my-zone> set ip-type=exclusive



& 
  


 


 
add net
#
$ 
  
 
#

zonecfg:my-zone> add net

# 6 
9.+ 7!

.+ 


  
 
192.168.0.1  


#
zonecfg:my-zone:net> set address=192.168.0.1

# !

  




  
 

hme

  

#
zonecfg:my-zone:net> set physical=hme0

# ! 2323(34/6&  


9.+ 7!


 


 
 
 
10.0.0.1  

#
zonecfg:my-zone:net> set defrouter=10.0.0.1

# 8 

  #

zonecfg:my-zone:net> end

, 
 



  
 
 

  
 
#
$ 

#

zonecfg:my-zone> add device

# !



  /dev/sound/*  

#
zonecfg:my-zone:device> set match=/dev/sound/*

# 8 



  #

zonecfg:my-zone:device> end

, 
 



  
 
 


#
$ -
9 


  

 
#

zonecfg:my-zone> set max-sem-ids=10485200

, 
 



  
 
 


 #
$ 
 
attr


#
zonecfg:my-zone> add attr

# !

 
comment#
zonecfg:my-zone:attr> set name=comment

# !


string#
zonecfg:my-zone:attr> set type=string

# !

 
 
 


-
#

zonecfg:my-zone:attr> set value="This is my work zone."

# 8 
attr



  #
zonecfg:my-zone:attr> end

;

-
   
-
#

zonecfg:my-zone> verify

0
-
   
-
#

zonecfg:my-zone> commit

8
zonecfg #
zonecfg:my-zone> exit

You might also like