Jump to content

vai73

Forum Members
  • Posts

    87
  • Joined

  • Last visited

Posts posted by vai73

  1. 2 часа назад, Albram сказал:

    ~ # opkg list-installed | grep lighttpd

    Скрытый текст

    ~ # opkg list-installed | grep lighttpd

    lighttpd - 1.4.55-1
    lighttpd-mod-cgi - 1.4.55-1
    ~ #

    да вроде все на месте, может что-то блокирует доступ

     

    30-cgi.conf lighttpd.conf smarthtml.sh smarthtml.cgi

  2. 8 минут назад, Albram сказал:

    (config)> service ?

    Скрытый текст

     

    (config)> service                                                                                                      

    (config)>     

     

  3. Только что, Albram сказал:

    cat /tmp/lighttpd/lighttpd.conf

    Скрытый текст

    ~ # cat /tmp/lighttpd/lighttpd.conf

    server.tag = "WebDAV server"
    server.document-root = "/tmp/mnt"
    server.max-worker = 10
    server.max-keep-alive-idle = 3600
    server.max-read-idle = 3600
    server.max-write-idle = 3600
    server.stream-request-body = 2
    server.stream-response-body = 2
    server.bind = "/var/lighttpd/lighttpd.sock"
    server.socket-perms = "0777"
    server.modules = ( "mod_accesslog", "mod_alias", "mod_extforward", "mod_ndmacl", "mod_access", "mod_webdav" )
    server.errorlog-use-syslog = "enable"
    server.stat-cache-engine = "disable"
    server.upload-dirs = ( "/tmp/mnt/01D635D03DB7BE50/.webdav-temp", "/tmp/mnt/fbdf0f42-d035-d601-90de-0742d035d601/.webdav-temp" )
    include "/etc/lighttpd/mime.conf"
    extforward.headers = ( "Forwarded" )
    extforward.forwarder = ( "all" => "trust" )
    extforward.params = ( "host" => 1, "remote_user" => 1 )
    $HTTP["url"] =~ "^/webdav($|/)" {
      dir-listing.activate = "enable"
      dir-listing.encoding = "utf-8"
      webdav.activate = "enable"
      webdav.is-readonly = "disable"
      webdav.sqlite-db-name = "/tmp/lighttpd/webdav.sqlite"
      alias.url = ( "/webdav" => "/tmp/mnt" )
      server.document-root = "/tmp/mnt"
    }
    accesslog.use-syslog = "disable"
    ~ #

     

     

  4. Моя ошибка. в WinSCP содержимое каталога tmp не видит

    Скрытый текст

    ~ # ls -l /tmp/
    -rw-r--r--    1 root     root          5273 Jun 17 22:11 RT2860AP.dat
    -rw-r--r--    1 root     root             6 Jan  1  1970 TZ
    drwxr-xr-x    3 root     root            80 Jun 17 22:11 avahi
    -rw-r--r--    1 root     root           295 Jun 19 17:35 coalagent.conf
    -rw-r--r--    1 root     root           309 Jun 20 10:16 coalagent.diag
    drwxr-xr-x    2 root     root            80 Jan  1  1970 db
    drwxr-xr-x    2 root     root           140 Jan  1  1970 dhcp6c
    -rw-r--r--    1 root     root            54 Jun 17 22:11 group
    -rw-r--r--    1 root     root            34 Jan  1  1970 hosts
    drwxr-xr-x    3 root     root            60 Jan  1  1970 lib
    drwxr-xr-x    2 root     root           100 Jun 19 19:09 lighttpd
    drwxr-xr-x    2 root     root            40 Jan  1  1970 log
    drwxr-xr-x    4 root     root           120 Jun 18 19:44 mnt
    -rw-r--r--    1 root     root           640 Jun 20 07:13 ndnproxymain.conf
    -rw-r--r--    1 root     root             4 Jun 17 22:11 ndnproxymain.pid
    -rw-r--r--    1 root     root           853 Jun 20 10:16 ndnproxymain.stat
    -rw-r--r--    1 root     root           762 Jun 20 07:13 ndnproxysafe.conf
    drwxr-xr-x    8 root     root           360 Jun 19 19:09 nginx
    drwxr-xr-x    3 root     root            60 Jun 17 22:11 openvpn
    -rw-r--r--    1 root     root           190 Jun 17 22:11 passwd
    drwxr-xr-x    2 root     root           140 Jun 17 22:11 ppp
    -rw-r--r--    1 root     root            57 Jun 19 11:20 resolv.conf
    drwxr-xr-x    6 root     root           780 Jun 20 07:13 run
    -rw-r--r--    1 root     root            44 Jan  1  1970 telnetd.conf
    drwxr-xr-x    2 root     root           100 Jun 17 22:11 tmp
    ~ #

     

     

  5. 4 минуты назад, Albram сказал:

    find / | grep lighttpd.conf

    Скрытый текст

    ~ # find / | grep lighttpd.conf
    /opt/etc/lighttpd/conf.d
    /opt/etc/lighttpd/conf.d/30-cgi.conf
    /opt/etc/lighttpd/lighttpd.conf
    /opt/lib/opkg/info/lighttpd.conffiles
    /tmp/lighttpd/lighttpd.conf
    /tmp/mnt/fbdf0f42-d035-d601-90de-0742d035d601/etc/lighttpd/conf.d
    /tmp/mnt/fbdf0f42-d035-d601-90de-0742d035d601/etc/lighttpd/conf.d/30-cgi.conf
    /tmp/mnt/fbdf0f42-d035-d601-90de-0742d035d601/etc/lighttpd/lighttpd.conf
    /tmp/mnt/fbdf0f42-d035-d601-90de-0742d035d601/lib/opkg/info/lighttpd.conffiles
    ~ #

     

     

  6. 12 часа назад, Albram сказал:

    что у вас бинарный файл лежит в /usr/sbin/

    /usr/sbin/ нет такой папки вообще

    12 часа назад, Albram сказал:

    а конфиг в /tmp/

    tmp пустой

     

    12 часа назад, Albram сказал:

    бинарник должен быть в /opt/sbin/lighttpd, а конфиг в /opt/etc/lighttpd/lighttpd.conf

    тут все нужное имеется

    но

    Скрытый текст

    login: root
    root@192.168.1.1's password:


    BusyBox v1.31.1 () built-in shell (ash)

    ~ # ps | grep lighttpd
    15405 root      4980 S    grep lighttpd
    25811 root      4076 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25812 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25813 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25814 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25815 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25816 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25817 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25818 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25819 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25820 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25821 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    ~ #

     

     

  7. 10 часов назад, Albram сказал:

    А вы как lighttpd ставили

    Как в первом посте opkg install lighttpd-mod-cgi

    10 часов назад, Albram сказал:

    Или lighttpd у вас в прошивке есть?

    крайний релиз KN-1910 3.4.6

    10 часов назад, Albram сказал:

    бинарник должен быть в /opt/sbin/lighttpd

    lighttpd он там имеется, дата файла 23.03.20

    и в /opt/sbin/lighttpd есть

    10 часов назад, Albram сказал:

    /opt/etc/lighttpd/lighttpd.conf

    lighttpd.conf имеется, дата файла 19.06.20 (порт менял)

  8. В 18.03.2019 в 19:49, Albram сказал:

    Т.е. вывод комадны ps | grep lighttpd пустой ?

    ~ # ps | grep lighttpd
     593 root      5468 S    lighttpd -f /opt/etc/lighttpd/lighttpd.conf

    Вот что заметил

    Цитата

     

    
    
    ~ # ps | grep lighttpd
    25099 root      4076 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25100 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25101 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25102 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25103 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25104 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25105 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25106 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25107 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25108 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25109 root      4132 S    /usr/sbin/lighttpd -D -f /tmp/lighttpd/lighttpd.conf
    25533 root      4980 D    grep lighttpd

     

    Нет ли тут ошибки?

  9. так то теперь только ручное обновление починить осталось, в остальном все красиво - графики рисует, скрипт автоматом запускает. Порты разные уже пробовал, не обновляет вручную. А может быть из-за того, что-то в самой системе что то отключено из компонентов или влияют настроцки роутера?

    Скрытый текст

    246784366_Screenshot_2020-06-18SMARTHtml.png.0858b5915ca391fdebd1230948e2b7cf.png

     

  10. 21 минуту назад, Albram сказал:

    А что у вас в конфиг файле /opt/etc/lighttpd/lighttpd.conf ?

    Скрытый текст

    server.document-root        = "/opt/share/www"
    server.upload-dirs          = ( "/tmp" )
    server.errorlog             = "/opt/var/log/lighttpd/error.log"
    server.pid-file             = "/opt/var/run/lighttpd.pid"
    #server.username             = "http"
    #server.groupname            = "www-data"

    index-file.names            = ( "index.php", "index.html",
                                    "index.htm", "default.htm",
                                  )

    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

    ### Options that are useful but not always necessary:
    #server.chroot               = "/"
    server.port                 = 8080
    #server.bind                 = "localhost"
    #server.tag                  = "lighttpd"
    #server.errorlog-use-syslog  = "enable"
    #server.network-backend      = "writev"

    ### Use IPv6 if available
    #include_shell "/opt/share/lighttpd/use-ipv6.pl"

    #dir-listing.encoding        = "utf-8"
    #server.dir-listing          = "enable"

    include "/opt/etc/lighttpd/mime.conf"
    include "/opt/etc/lighttpd/conf.d/*.conf"

     

    Хм, вроде показался график

     

    Screenshot_2020-06-17 S M A R T Html.png

  11. 13 минуты назад, Albram сказал:

    Может вам проще переустановить Entware, и скрипт заново скачать с гитхаба и установить?

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

    один хрен, Check Now > Server error:0:  и графиков нет. До кучи и USE_FDISK=0 для проверки поставил.

    Осталось только

    В 08.10.2016 в 18:38, beowulf0208 сказал:

    в случае если ваш веб-сервер запускается с правами суперюзера (что в принципе нехорошо, но для embedded-систем является обычным делом), то нет никаких проблем. Если же сервер, скажем, публичный и запускается с правами специально созданного непривелегированного юзера, то можно использовать утилиту sudo

    этот этап пробовать, так как этот раздел инструкции даже не пробовал. Может у меня из-за этого не срабатывать построение графиков и работа кнопок на странице?

    И так и не понял , какой все таки правильный порт в lighttpd.conf - 80, 81, 8080 или вообще в комментах как по умолчанию

     

  12. 8 часов назад, Albram сказал:

    msmtp установлен и настроен

    вообще не трогал за ненадобностью

    8 часов назад, Albram сказал:

    Попробуйте ещё вот этот файл положить в /opt/etc/

    Заменил, перезагрузил роутер.

    8 часов назад, Albram сказал:

    Так-то у вас и smart читается и история температуры показывается.

    Не совсем, это происходит скорее всего после ручных запусков скрипта, вот сегодняшний свежий скрин, последняя дата время температуры вчерашняя.

    Я уже думаю, может права/разрешения где "криво" стоят, как бы понять где какие должны быть и у каких файлов проверить.

    Screenshot_2020-06-16 S M A R T Html.png

    Снимок.JPG

  13. 19 часов назад, Albram сказал:

    сделайте:

    ### S.M.A.R.T. attributes for RRD
    RRD_SMART_ATTRS="smart3 smart190 smart194"  # Spin-up time & temperature
    #RRD_SMART_ATTRS="smart190 smart194"    # Only a temperature data for RRD
    RRD_SMART_ATTR_DEF_PIC="smart190 smart194"

    Удалите файл /opt/var/smarthtml/rrd/sda.rrd

    И запустите скрипт.

    Сделано. Пропали кнопки/сылки вверху справа страницы и остальное без изменений. В догонку еще  /opt/usr/bin/smarthtml.sh makerrdgraph  сделал.

    не может быть проблем из-за того что при

    BusyBox v1.31.1 () built-in shell (ash)
    
    ~ #  /opt/usr/bin/smarthtml.sh
    df: /dev/sda2: can't find mount point
    ~ #

    ругается на sda2?

     

     

    Screenshot_2020-06-15 S M A R T Html.png

  14. 32 минуты назад, Albram сказал:

    Вот попробуйте

    Спасибо. Проверю,отпишусь.

    ps

    Цитата

    ~ #  /opt/usr/bin/smarthtml.sh makerrdgraph

    ERROR: No DS called 'smart190' in '/opt/var/smarthtml/rrd/sda.rrd'
    ERROR: No DS called 'smart190' in '/opt/var/smarthtml/rrd/sda.rrd'
    ERROR: No DS called 'smart190' in '/opt/var/smarthtml/rrd/sda.rrd'
    ~ #

     

     

  15. 1 час назад, Albram сказал:

    /opt/usr/bin/smarthtml.sh makerrdgraph

    пусто

    Уточнение - даты файлов sda_smart3_-14days.png и sda_smart3_-30days.png после ввода команды изменились на момент исполнения команды, smart.html и все остальные png в папке share\www\ "старые"

     

    57 минут назад, Albram сказал:

    В "шапке" скриптов smarthtml.sh и smarthtml.cgi версии одинаковые?

    
    ########################################################################
    #
    # S.M.A.R.T.Html v1.0 (c) 2018
    #
    # Author:   gSpot at wl500g.info
    # License:  GPLv3
    # Depends:      smartmontools
    # Recommends:   rrdtool, sendmail, openssl
    #
    ########################################################################
    
    ########################################################################
    #
    # This is a part of S.M.A.R.T.Html v1.0 (c) 2018
    #
    # Author:   gSpot at wl500g.info
    # License:  GPLv3
    # Depends:      smartmontools
    # Recommends:   rrdtool, sendmail, openssl, sudo
    #
    ########################################################################

     

  16. 10 минут назад, Albram сказал:

    ls -l /opt/share/www/cgi-bin/smarthtml.cgi

    ~ # ls -l /opt/share/www/cgi-bin/smarthtml.cgi
    -rwxr-xr-x    1 root     root          1112 Jun 14 08:40 /opt/share/www/cgi-bin/smarthtml.cgi
    ~ #

     

    15 минут назад, Albram сказал:

    Раздел с Entware на какой файловой системе, не на ntfs случайно?

    ext3 или 4,  конечно

  17. по 1.

    Скрытый текст

    server.modules += ( "mod_cgi" )

    ##
    ## Plain old CGI handling
    ##
    ## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
    ##
    cgi.assign                 = ( ".pl"  => "/opt/bin/perl",
                                   ".cgi" => "/bin/sh",
                                   ".rb"  => "/opt/bin/ruby",
                                   ".erb" => "/opt/bin/eruby",
                                   ".py"  => "/opt/bin/python" )

     

    Скрытый текст

    ############################## Settings ################################
    ### Devices (example for multiple devices: DEVICES="/dev/sda /dev/sdb /dev/sdc")
    DEVICES="/dev/sda"
    ### Disabled S.M.A.R.T. attributes (ex. vendor specific or unimportant attributes)
    DISABLED_SMART_ATTRS="smart211 smart212 smart213 smart214 smart215 smart216 smart217 smart230"
    ### Temperature warning
    TEMP_ALERT=50
    ### Auto reset warnings (0 - disable; 1 - enable)
    WARN_AUTO_RESET=1
    WARN_AUTO_RESET_DAYS=30
    ### Show SCT temperature history (0 - disable; 1 - enable)
    TEMP_HISTORY=1
    ### Write S.M.A.R.T. changes to device log (0 - only critical warnings; 1 - all changes)
    LOG_ALL=0
    ### Partitions info - fdisk support (0 - disable; 1 - enable)
    USE_FDISK=1
    ### Capacity warning (in %)
    FS_CAPACITY_LIMIT_WARNING=90
    ### Write critical warnings to syslog (0 - disable; 1 - enable)
    USE_LOGGER=1
    ### E-mail support for critical warnings (0 - disable; 1 - enable)
    USE_MAIL=1
    ### Mail settings:
    MAIL_RECIPIENT="myaddr@mail.com"
    #MAIL_SENDER="email@gmail.com"
    #MAIL_LOGIN="email@gmail.com"
    #MAIL_PASSWORD="password"
    #MAIL_SMTP="smtp.gmail.com:25"
    ### RRD support (0 - disable; 1 - enable)
    USE_RRD=1
    ### RRD database preset (1 - 30mins; 2 - 1hour; 3 - 3hours; 4 - 6hours; 5 - 12hours; 6 - 24hours)
    RRD_DB_PRESET=3
    ### S.M.A.R.T. attributes for RRD
    RRD_SMART_ATTRS="smart3 smart194" # Spin-up time & temperature
    #RRD_SMART_ATTRS="smart194" # Only a temperature data for RRD
    RRD_SMART_ATTR_DEF_PIC="smart194"
    ### CGI-module smarthtml.cgi (0 - disable; 1 - enable)
    USE_CGI_MODULE=1

     

    по п.3

    Скрытый текст

    ~ # crontab -e

    no crontab for root - using an empty one
    /opt/bin/sh: /bin/vi: not found
    crontab: "/bin/vi" exited with status 127
    ~ # cat /opt/etc/crontab
    SHELL=/bin/sh
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/bin:/opt/sbin
    MAILTO=""
    HOME=/
    # ---------- ---------- Default is Empty ---------- ---------- #
    42 4 1 * * root /opt/bin/run-parts /opt/etc/cron.monthly
    # Read the information to the hard drive SMART #
    10 */3 * * * root /opt/usr/bin/smarthtml.sh

    ~ # ps | grep cron
      792 root      4272 S    cron -s
     

     

     

  18. Полноценно заставить работать не получилось, ручное обновление не работает, графики не рисует, температуру начинает показывать при ручной команде /opt/usr/bin/smarthtml.sh. Где то ошибка. Каким образом выявить ошибку?

     

    Screenshot_2020-06-14 S M A R T Html.png

  19. Скрытый текст

    ~ # smartctl -a -d scsi /dev/sda
    smartctl 7.1 2019-12-30 r5022 [mips-linux-4.9-ndm-4] (localbuild)
    Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

    === START OF INFORMATION SECTION ===
    Vendor:               WD
    Product:              Elements SE 25FF
    Revision:             1018
    Compliance:           SPC-4
    User Capacity:        4,000,752,599,040 bytes [4.00 TB]
    Logical block size:   512 bytes
    Physical block size:  4096 bytes
    LU is resource provisioned, LBPRZ=0
    Rotation Rate:        5400 rpm
    Form Factor:          2.5 inches
    Serial number:        WX11DA94HR45
    Device type:          disk
    Local Time is:        Fri Jun 12 10:34:53 2020 MSK
    SMART support is:     Unavailable - device lacks SMART capability.

    === START OF READ SMART DATA SECTION ===
    Current Drive Temperature:     0 C
    Drive Trip Temperature:        0 C

    Error Counter logging not supported

    No Self-tests have been logged

    ~ #

    Я так понимаю, дальше можно не разбираться. Температур не видит.
     

     

×
×
  • Create New...