AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-251721

Marco Marsala's questions

Martin Hope
Marco Marsala
Asked: 2016-09-17 05:14:42 +0800 CST

除了每月的第一天,每天运行一个 cronjob

  • 5

我试着:

  1. 每月第一天运行作业 A:0 0 1 * *
  2. 在该月的其他几天运行作业 B:0 0 2-31 * ?

Ubuntu 14.02 LTS 上的 Vixie cron 拒绝第二种语法,尽管根据Wikipedia和官方规范它似乎是有效的:

“crontab”,The Open Group Base Specifications Issue 7 — IEEE Std 1003.1,2013 版,The Open Group,2013,2015 年 5 月 18 日检索

根据上面的参考资料,该语法0 0 2-31 * *将在每月的每一天运行该作业,因为第三个和第五个字段被视为运行条件的 OR 子句。

ubuntu cron
  • 3 个回答
  • 12459 Views
Martin Hope
Marco Marsala
Asked: 2015-12-01 01:54:34 +0800 CST

服务器冻结后解释 /var/log/messages 输出

  • 0

我的服务器冻结了。我重启了,手动运行fsck后,服务正常重启了。我在故障发生时分析 /var/log/messages,我发现了这些条目:

Nov 29 22:24:27 cloud kernel: ata1: exception Emask 0x10 SAct 0x0 SErr 0x4090000 action 0xe frozen
Nov 29 22:24:27 cloud kernel: ata1: irq_stat 0x00400040, connection status changed
Nov 29 22:24:27 cloud kernel: ata1: SError: { PHYRdyChg 10B8B DevExch }
Nov 29 22:24:27 cloud kernel: ata1: hard resetting link
Nov 29 22:24:34 cloud kernel: ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Nov 29 22:24:34 cloud kernel: ata1.00: configured for UDMA/133
Nov 29 22:24:34 cloud kernel: ata1: EH complete

这可能表示硬盘故障,但我对硬盘进行了长时间的 SMART 测试,输出如下:

smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-573.7.1.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Constellation ES (SATA 6Gb/s)
Device Model:     ST1000NM0011
Serial Number:    Z1N2D4JT
LU WWN Device Id: 5 000c50 04e008fb2
Firmware Version: PA07
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Mon Nov 30 15:29:22 2015 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (  609) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        ( 151) minutes.
Conveyance self-test routine
recommended polling time:        (   3) minutes.
SCT capabilities:              (0x10bd) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   069   063   044    Pre-fail  Always       -       8118850
  3 Spin_Up_Time            0x0003   095   095   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       15
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   084   060   030    Pre-fail  Always       -       4627909443
  9 Power_On_Hours          0x0032   073   073   000    Old_age   Always       -       24302
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       21
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   075   064   045    Old_age   Always       -       25 (Min/Max 23/25)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       27
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       29
194 Temperature_Celsius     0x0022   025   040   000    Old_age   Always       -       25 (0 20 0 0 0)
195 Hardware_ECC_Recovered  0x001a   105   099   000    Old_age   Always       -       8118850
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       169642618276709
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       3860229105
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       1373595990

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%     24302         -
# 2  Short offline       Completed without error       00%     24299         -
# 3  Short offline       Completed without error       00%     24298         -
# 4  Short offline       Completed without error       00%         4         -
# 5  Extended offline    Completed without error       00%         4         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

硬盘最近已经更换了。内核版本为 2.6.32-573.7.1.el6.x86_64

hard-drive
  • 1 个回答
  • 315 Views
Martin Hope
Marco Marsala
Asked: 2015-09-17 02:04:48 +0800 CST

[S1090][unixODBC][Driver Manager]无效的字符串或缓冲区长度

  • 2

发出时出现上述错误

 isql 'odbc:Driver={ODBC Driver 11 for SQL Server};SERVER=<redacted>;DATABASE=<redacted>;' username password -v

在我的 Linux CentOS 6.7 上作为 root 用户。

以下 bcp 命令有效,因此驱动程序应该可以正常工作:

bcp master.INFORMATION_SCHEMA.TABLES out OutFile.dat -S <redacted> -U user -P password

此命令也有效:

sqlcmd -Sg<redacted> -Uuser -Ppassword

此外,如果以 root 身份从命令行运行此 PHP 脚本,将返回错误:

<?php
$connStr = 'odbc:Driver={ODBC Driver 11 for SQL Server};SERVER=<redacted>;DATABASE=<redacted>;';
$dbUser = '<redacted>';
$dbPass = '<redacted>';

$db = new PDO($connStr, $dbUser, $dbPass);
?>

[root@ru000397 ~]# php prova.php
PHP Fatal error:  Uncaught exception 'PDOException' with message 'could not find driver' in /root/prova.php:6
Stack trace:
#0 /root/prova.php(6): PDO->__construct('odbc:Driver={OD...', '<redacted>', '<redacted>')
#1 /root/prova.php(10): db_connect()
#2 {main}
  thrown in /root/prova.php on line 6

我已经安装了 Microsoft ODBC Driver 11 for SQL Server for Linux ( https://msdn.microsoft.com/library/hh568451(SQL.110).aspx ) 和 unixODBC 2.3.0 没有问题。

我的主要目标是能够使用 ODBC 通过 PHP PDO 连接到 MS SQL 实例。

sql-server
  • 1 个回答
  • 6242 Views
Martin Hope
Marco Marsala
Asked: 2015-07-06 22:46:21 +0800 CST

Postfix SMTP 服务器:错误来自

  • 0

我正在运行 Postfix 邮件服务器 ru000397.widhost.net。我在 [email protected] 收到了其中一些消息。

邮件服务正在运行,显然,所有驱动程序都有很多可用空间。

Transcript of session follows.

 Out: 220 ru000397.widhost.net ESMTP Postfix
 In:  EHLO m145.gem.godaddy.com
 Out: 250-ru000397.widhost.net
 Out: 250-PIPELINING
 Out: 250-SIZE 52428800
 Out: 250-ETRN
 Out: 250-STARTTLS
 Out: 250-AUTH CRAM-MD5 DIGEST-MD5 LOGIN PLAIN
 Out: 250-ENHANCEDSTATUSCODES
 Out: 250-8BITMIME
 Out: 250 DSN
 In:  MAIL FROM:<[email protected]> BODY=8BITMIME
 Out: 452 4.3.1 Insufficient system storage
 In:  RCPT TO:<[email protected]>
 Out: 503 5.5.1 Error: need MAIL command
 In:  DATA
 Out: 503 5.5.1 Error: need RCPT command
 In:  QUIT
 Out: 221 2.0.0 Bye


For other details, see the local mail logfile

main.cf:http://pastebin.com/RCBx891e master.cf:http://pastebin.com/1HMyXzuT _ _

这是我的 df 输出:

[root@ru000397 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        22G   20G  1.5G  94% /
tmpfs           7.8G   12K  7.8G   1% /dev/shm
/dev/sdb        2.7T  1.7T  867G  67% /usr/local/psa

[root@ru000397 ~]# df -i
Filesystem        Inodes    IUsed     IFree IUse% Mounted on
/dev/sda2        1455328   242748   1212580   17% /
tmpfs            2035051        2   2035049    1% /dev/shm
/dev/sdb       181141504 11000662 170140842    7% /usr/local/psa

这是我的 message_size_limit:

[root@ru000397 ~]# postconf -n|grep message_size_limit
message_size_limit = 52428800
postfix
  • 2 个回答
  • 4160 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve