Каталог статей
Меню сайта


Форма входа


Категории раздела
Oracle DB [72]
Materials concerning Oracle database
Howto [24]
Все про Oracle [65]
Разработка на SQL и PL/SQL для Oracle, анализ работы базы
Построение Web-интерфейса: все что касается JSF, ADF и AJAX [9]
Разное [19]
Solaris [46]
Что касается администрирования Solaris
Linux [29]
Заметки по настройке Linux
AIX [1]
AIX, настройка Oracle на AIX
Java [15]
Cryptography [10]
Windows [1]
Java [35]
PostgreSQL [2]


Поиск


Друзья сайта
  • Официальный блог
  • Сообщество uCoz
  • FAQ по системе
  • Инструкции для uCoz


  • Статистика

    Онлайн всего: 3
    Гостей: 3
    Пользователей: 0


    Приветствую Вас, Гость · RSS 14.06.2025, 22:26
    Главная » Статьи » Howto

    Полезные команды по Solaris


    корректный shutdown

    shutdown -y -i5 -g0

    reboot:

    shutdown -y -i6 -g0

    перейти в single-user mode

    reboot -- -s

    init 1

    shutdown -y -i1 -g0

    настройка OpenBoot:

    чтобы отключить auto-boot:
    eeprom "auto-boot?"=false
    посмотреть текущие настройки: eeprom

    если нет root'ового захода, то можно удаленно зайти в ALOM (#. - выход из консоли)
    потом перейти в OpenBoot (набрать break или послать сигнал Break во время загрузки)
    потом в командной строке OpenBoot - "ok>" - набрать:
    setenv auto-boot? false

    загрузка в single-mode:
    ok> boot -s

    посмотреть сколько есть памяти:

    /usr/sbin/prtconf | grep "Memory size"
    
    текущее использование памяти на уровне системы:
    

    http://www.oracle.com/technetwork/server-storage/solaris10/solaris-memory-135224.html

    >swap -s
    
    total: 11778760k bytes allocated + 7271384k reserved = 19050144k used, 34184328k available
    

    # echo '::memstat' | mdb -k
    Page Summary                Pages                MB  %Tot
    ------------     ----------------  ----------------  ----
    Kernel                     862970              6741   10%
    ZFS File Data             1472240             11501   18%
    Anon                      1450449             11331   18%
    Exec and libs               32109               250    0%
    Page cache                 150714              1177    2%
    Free (cachelist)           919247              7181   11%
    Free (freelist)           3347491             26152   41%

    Total                     8235220             64337
    Physical                  8213592             64168

    To find how much free memory is currently available in the system, use the vmstat command. Look at the free column (the unit is KB). For example:

    -bash-3.00# vmstat 2
     kthr memory page disk faults cpu
     r b w swap free re mf pi po fr de sr dd s1 -- -- in sy cs us sy id
     0 0 0 2265520 262208 1 8 1 1 1 0 0 1 -1 0 0 309 193691 310 41 31 28
     0 0 0 2175632 176072 3 8 0 0 0 0 0 0 0 0 0 326 278310 348 58 42 0
     0 0 0 2175632 176120 0 0 0 0 0 0 0 0 0 0 0 305 263986 408 56 44 0

    The vmstat output shows that the system has about 176 Mbytes of free memory. In fact, on Solaris 8 or later, the free memory shown in the vmstat output includes the free list and the cache list. The free list is the amount of memory that is actually free. This is memory that has no association with any file or process. The cache list is also the free memory; it is the majority of the file system cache. The cache list is linked to the free list; if the free list is exhausted, then memory pages will be taken from the head of the cache list.

    To determine if the system is running low on physical memory, look at the sr column in the vmstat output, where sr means scan rate. Under low memory, Solaris begins to scan for memory pages that have not been accessed recently and moves them to the free list. On Solaris 8 or later, a non-zero value of sr means the system is running low on physical memory.

    
    посмотреть информацию по процессорам
    
    /usr/sbin/psrinfo -v
    
    /usr/sbin/prtdiag
    
    проверить диски и CDROM
    
    iostat -En
    
    посмотреть ошибки на устройствах:
    iostat -En
    
    выполнить операцию с файлами в случае, когда файлов много и команды с шаблонами * не проходят (на примере перемещения):
    find /dir1 -type f -exec mv {} /dir2 \;
    
    удалить файлы старше 5 дней:
    find /path/to/files* -mtime +5 -exec rm {} \;
    
    найти файлы в диапазоне дат:
    find ./ \( -newer /tmp/newerstart \! -newer /tmp/newerend \)
    
    найти файлы с расширением properties, содержащие "upload":
    find ./ -name "*.properties" -print0 | xargs -0 grep -li upload
    
    заменить все вхождения кавычки на #@#:
    sed -e "s/'/#@#/g" qchk.txt
    
    посчитать хэш для файла:
    digest -a md5 -v /path-to-file
    
    найти симлинки, ссылающиеся на TARGET:
    TARGET=targetdir; find . -type l -exec ls -l {} \; | grep -- "-> $TARGET";
    
    убить процессы по имени:
    ps -ef | grep "process name" | awk '{print $2}' | xargs kill -9 
    

     

    посмотреть io по процессам
    dtrace <script>
    описание dreace можно найти здесь: 
    http://www.brendangregg.com/dtrace.html
    
    Испечь сертификат pkcs12:
    openssl pkcs12 -export -in clicert.pem -out aaa.p12
    
    прочитать (попробовать, читается ли) блок с устройства:
    dd if=/dev/rdsk/emcpower1a of=/dev/null bs=512 count=1
    
    
    посмотреть количество inode для файловых систем:
    
    df -F ufs -o i
    
    По подключению EMC:
    После команд (из-под root):
    devfsadm -C
    powermt config
    powermt display dev=all
    
    либо согласно другому источнику
    To create emcpower devices on Solaris you should only have to run the following commands:
    powercf -q
    powermt config
    powermt save 
    powermt display dev=all 
    должен быть показан новый том. 
    Дальше с помощью format нужно записать label на новый том
    и посмотреть/поменять разбивку по партициям.
    Дальше делаем файловую систему 
    newfs /etc/rdev/emcpower5a
    
    где буква соответствует номеру партиции а=0; b=1 и т.д.
    
    в случае проблем полезно посмотреть на 
    powermt display options
    
    если нужное устройство не поддерживается, сконфигурировать:
    bash-3.00# powermt manage class=vnx
    bash-3.00# powermt config
    bash-3.00# powermt display dev=all
    
    Работа с пакетами:
    - посмотреть, установлен ли пакет:
    # pkginfo | grep package
    - посмотреть подробную информацию о пакете:
    # pkginfo -l exact_package_name
    - установить пакет
    # pkgadd -d packet_file
    - проверить, какому пакету принадлежит файл
    # pkgchk -lp full_path_to_some_file
    
    Reconfiguration boot:
    

    # touch /reconfigure; init 6

    или

     

    OK> boot -r

    или

    # reboot -- -r

    реконфигурационная перезагрузка может понадобиться после добавления новых устройств.
    Во время реконфигурирования

     

     

    the system discovers new hardware and recreates the file /etc/path_to_inst which contains mappings of physical devices to logical instance numbers.

     

     

    Как посмотреть текущую версию Solaris

     

    cat /etc/release

    примерный вывод -

    Solaris 10 10/08 s10s_u6wos_07b SPARC
    Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 27 October 2008

    "u6wos" - 6 - это update level.

    Послезные ссылки по теме:

    http://solarisblog.ru/

    http://bhami.com/rosetta.html

    Как сопоставить диски ssdXX в выводе команды iostat -dx и точки монтирования

    1. команда #>format показывает список дисков в длинном формате навроде такого:

    4. c3t6006016092302F0052A50BF41EEDE111d0 <DGC-RAID 1-0531-384.78GB>
              /scsi_vhci/ssd@g6006016092302f0052a50bf41eede111

    по порядку и по размеру можно попробовать догадаться, что это за файловые системы

    2. команда grep ssd /etc/path_to_inst  выводит список длинных форматов и номер ssd

     

    Что делать при ошибке размонирования диска "device busy"

    Посмотреть процессы, использующие девайс:

    fuser -u /dev/dsk/c0t2d0s7
    
    Убить все процессы, использующие девайс
    
    fuser -k /dev/dsk/c0t2d0s7
    
    (In Linux, you can use the -m option to allow you to specify the filesystem by name. On Solaris and IRIX, the -c option performs the same task.)
    
    
    How to check fiber channel post status and configuration:
    

    https://unixsa.wordpress.com/2009/06/26/solaris-10-fc-command-examples/

    To see info on all fc ports:
    fcinfo hba-port -l
    
    To see port status: luxadm -e port 
    Show link errors: luxadm -e rdls /dev/cfg/c3 
    Examine and individual path: luxadm disp /dev/rdsk/c2t500601603022431Ed0s2
    Display info on scsi devices: 
    # cfgadm -al

     

     

    Категория: Howto | Добавил: basil (19.10.2010)
    Просмотров: 5219 | Комментарии: 2 | Рейтинг: 0.0/0
    Всего комментариев: 1
    1 crypto leads Res  
    0
    Good day, colleagues!

    We would like to offer you Unique database of crypto industry sources.
    Crypto sources base contains more than 22k+ targeted email records of cryptocurrency, blockchain, ICO/ITO/STO, fintech and related sources.

    Our email list is the best solution to attract your crypto audience.

    24000+ keywords were used while scraping search engines results.

    Enjoy this high-quality verified email database which was made specifically to promote ICOs, Startups and other crypto related businesses.

    You will receive the COMPLETE verified email base for ONLY $99 at once! (Regular price is $300).

    We accept Payoneer, Qiwi, BTC/ETH payments.

    The download link will be sent to your e-mail address.

    Contacts us:
    telegram: @hot_leads

    Viber, Whatsapp + 7 9o3 316 11 95

    #tags, keywords: blockchain, crypto industry, bitcoin, ICO/STO
    cryptocurrency investment strategy
    first bitcoin miners
    bitcoin value wikipedia
    crypto trading platform
    bitcoin european commission
    ICO foi
    bitcoin value usd
    wymiana dogecoin na bitcoin
    merged mining namecoin bitcoin
    what is bitcoin mining used for
    cryptocurrency trading jobs uk
    криптовалюта цена

    Имя *:
    Email *:
    Код *:
    Бесплатный конструктор сайтовuCoz