bug:file name too long文件名超出系统最大限制

各操作系统支持最长的文件和目录名称长度(Linux、Win、Mac)

今天开发需求的时候发现无法新建文件,提示file name too lang,于是翻阅和查询了一些资料,发现不同操作系统下文件名和目录名最长的长度不同。

操作系统文件名最大长度(字节)路径最大长度
Linux2554096
MAC2551024
Windows(未开启长文件名)255260
Windows(开启长文件名)25532767

注意:文件名包含扩展名

  • 如果我们在linux或者mac上创建带有特殊字符的目录时,直接使用单引号引起来即可,如:‘啊1Aa~!@#$%^&()_+{}’

文件名和目录名在操作系统中都有最大长度的限制,而且不同系统中的最大长度不同。

1 linux

Linux的 /usr/include/linux/limits.h 中做出了说明

在这里插入图片描述

上述文件内容的第11行和第12行分别说明了文件名和相对路径名的最大长度。需要说明的是,字符指的是ASCII字符,如果是汉字或者其他语言,则需要视编码而定。

这些限制在Linux系统下可以通过修改系统内核修改这个限制。

Linux文件名和目录的长度限制是255个字符(字节,linux中所说的字符是以ascii码来编码的)

例如:255个英文字母,包含中文则不足255个

2 windows

Windows 通常限定文件名最多包含 260 个字符(一个汉字占用两个字符哦)。但实际的文件名必须少于这一数值,因为完整路径(如 C:\Program Files\filename.txt)都包含在此字符数值中。

windows下完全限定文件名必须少于260个字符,目录名必须小于248个字符。

  • win7x64位环境:

260个长度是作为总的文件名长度限制。

例如:所在文件夹的长度为50

则文件名的长度被限制在210之下,超出的话会被进行截断。

如果在程序中的话,超出长度的话MoveFile/CopyFile会返回错误,处理失败。

例子:

我手动在C:\建立一个文件,使用280个长度进行重命名,实际生成的却是文件名是256个长度(.txt也会算长度)

1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklm.txt

实际生成文件名:

xxxxx省略

共计256个长度,加上”C:\”三个长度,共计259个长度,再加一个字符串结束符’\0’,正好260位长度

注意:如果文件名过长,可以通过开启windows的长文件名开关

3 mac

文件名最长255字节(包含扩展名),路径最长:1024

参考文章:
https://blog.csdn.net/beyondlpf/article/details/7873045
https://blog.csdn.net/jimmyleeee/article/details/124682486

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
OutlookAttachView v2.73 Copyright (c) 2009 - 2014 Nir Sofer Web site: http://www.nirsoft.net Related Utilities ================= * NK2Edit - Edit, merge and fix the AutoComplete files (.NK2) of Microsoft Outlook. Description =========== OutlookAttachView scans all messages stored in your Outlook, and displays the list of all attached files that it finds. You can easily select one or more attachments and save all of them into the desired folder, as well as you can delete unwanted large attachments that take too much disk space in your mailbox. You can also save the list of attachments into xml/html/text/csv file. System Requirements =================== * Windows 2000/XP/Vista/7/8/2003/2008. * Microsoft Outlook 2003, Microsoft Outlook 2007, Microsoft Outlook 2010, or Microsoft Outlook 2013. For the 64-bit version of Outlook 2010/2013, you should use the x64 version of OutlookAttachView. Be aware that OutlookAttachView doesn't work with Outlook Express. Versions History ================ * Version 2.73 o OutlookAttachView now also scans the root folder of the .pst file. * Version 2.72 o Added %from_email% and %to_email% variables to the attachment filename format. * Version 2.71 o Added %localmsgtime% and %localmsgdate% variables to the attachment filename format. o Fixed a crash problem occurred on some systems after version 2.70 update. * Version 2.70 o Fixed to display date/time values according to daylight saving time settings. * Version 2.69 o Fixed bug: OutlookAttachView crashed on some systems. * Version 2.68 o Added secondary sorting support: You can now get a secondary sorting, by holding down the shift key while clicking the column header. Be aware that you only have to hold down the shift key when clicking the second/third/fourth column. To sort the first column you should not hold down the Shift key. * Version 2.67 o Fixed bug: when turning on the 'Image Preview' option, OutlookAttachView displayed empty image or incorrect image. * Version 2.66 o Added more accelerator keys (in the menus). * Version 2.65 o Added 'Image Preview' option (Under the View menu). If you turn on this option, a preview of selected gif/png/jpg file will be displayed in the lower pane. Be aware that this feature is quite slow... * Version 2.63 o The number of attachments is now displayed in the status bar while scanning the mailbox of Outlook. * Version 2.62 o Added 'Recent Config Files' menu, which allows you to easily open the last 10 configuration files that you used. * Version 2.61 o Added GB and Automatic to the 'File Size Unit' option. * Version 2.60 o Added option to save and load the entire configuration of OutlookAttachView ('Save Configuration' and 'Load Configuration' under the File menu). * Version 2.56 o OutlookAttachView now remembers the last size and position of the 'Copy Selected Files To...' window. * Version 2.55 o You can now specify wildcards (For example: nir*.doc, abc???.txt) in the include/exclude filename option. * Version 2.51 o Added option to choose the file size display unit: Bytes, KB, or MB. * Version 2.50 o OutlookAttachView now remembers that last 20 strings you typed in the Extensions List, Excluded Extensions List, Subject contains string..., From string, and To string, and you can easily select a string again from a Combo-Box. * Version 2.47 o Added option to choose another font (font name and size) to display the attachments list. (Options -> Select Another Font) * Version 2.46 o Fixed the flickering occurred while scrolling the attachments list. * Version 2.45 o You can now resize the scan options dialog-box. Also, the last size and position of this dialog-box is saved to the config file. * Version 2.43 o Added %attach_id% variable to the attachment filename format. * Version 2.42 o Added option to change the maximum number of characters in every variable of formatted filename. (The default is 64 characters) * Version 2.41 o Added option to filter by the message direction (incoming or outgoing) in the Scan Options window. * Version 2.40 o Added %message_direction% and %message_entryid% variables to the attachment filename format. * Version 2.38 o The 'Show Inline Attachments' option is now turned on by default (In previous versions it was turned off). The reason for this changed: I found out that many users think that there is a bug in OutlookAttachView because they can't find some of the attachments, without understanding that they have to turn on the 'Show Inline Attachments' option. * Version 2.37 o Fixed issue: The properties and the options windows opened in the wrong monitor, on multi-monitors system. * Version 2.36 o Added 'Auto Size Columns+Headers' option, which allows you to automatically resize the columns according to the row values and column headers. * Version 2.35 o Added 'Message EntryID' column, which displays the ID string of the Outlook message. * Version 2.32 o Added %domain% variable to the attachment filename format. * Version 2.31 o Added /SaveDirect command line option, for using with the other save command-line options (/scomma, /stab, /sxml, and so on...) When you use the SaveDirect mode, the attachments list is saved directly to the disk, without loading them into the memory first. This means that you can save a list with large amount of attachment lines into your disk without any memory problem, as long as you have enough disk space to store the saved file. The drawback of this mode: You cannot sort the attachments according to the column you choose with /sort command-line option. * Version 2.30 o Added 'Domain' column, which displays the domain of the from/to email address. * Version 2.25 o Added 'Message Direction' column (Incoming or Outgoing). * Version 2.20 o Added 'From Email' and 'To Email' columns, which displays the From/To email addresses. (The existing To/From columns shows the 'Display Name') * Version 2.15 o Added 'Put Icon On Tray' option. * Version 2.11 o When trying to connect to Outlook 2010 with the wrong build of OutlookAttachView (OutlookAttachView 32-bit with Outlook x64 or OutlookAttachView x64 with Outlook 32-bit), OutlookAttachView now displays informative error message about the problem. * Version 2.10 o Changed the user interface of the Main Scan Options window, to make it useable for lower screen resolutions and to give more space to the folders/subjects/from/to include/exclude lists. * Version 2.05 o Added 'Skip Exchange public folders' option. * Version 2.00 o Added command-line options to change any configuration value. * Version 1.95 o Added /extractall command-line option, which allows you to extract all Outlook attachments from command-line, according to your saved settings. * Version 1.90 o Added option to scan only emails in the last xx days (alternative to the date/time range). * Version 1.85 o Added option to scan only emails with the specified 'From' and 'To' strings. * Version 1.82 o When adding a folder to scan (with the Add button), the folder path in now delimited with quotes, to ensure that it'll be scanned properly if the folder name contains a comma character. * Version 1.81 o Fixed a crash problem when trying to save outlook attachment. * Version 1.80 o Added 'Add' buttons, which allows you to easily add folders to scan or skip by choosing them from the list of Outlook folders. * Version 1.75 o Added the ability to choose the desired Outlook profile inside the 'Mailbox Scan Options' window. * Version 1.72 o You can now specify a folder with all its subfolders (to include or to skip) by adding * character to the folder string, for example: Personal Folders\Inbox* * Version 1.71 o Fixed OutlookAttachView to be able to scan the public folders of Exchange server. * Version 1.70 o Added option to specify a custom date/time format for the filename in the 'Copy Selected Files To...' option, for example: %msgdate:yyyyMMdd% , %msgtime:HHmmss% * Version 1.67 o OutlookAttachView now displays (in the status bar) the current copied filename while copying the attachments. It also allows you to stop the copying process by clicking the stop menu. * Version 1.66 o In the 'Copy Selected Files To...' window, you can now specify a subfolder in the attach filename format. For example, if the filename format is %folder_name%\%subject%_%attach_name%.%extension% - All attachments from the inbox will be saved under the Inbox subfolder, All attachments from Sent Items will be saved under the Sent Items subfolder, and so on... o You can also choose the 'Create subfolders automatically' option if you want that OutlookAttachView will automatically create the subfolders for you. * Version 1.65 o Added time fields for the scanning date range. o The date range is now saved in the .cfg file. * Version 1.63 o Added 2 actions to 'Double-Click Action': 'Open Selected Attachment With' and 'Copy Selected Attachment To' * Version 1.62 o Fixed bug: OutlookAttachView crashed when trying to extract a special type of attachment. * Version 1.61 o Added 'Mark Inline Attachments' option. When it's turned on, inline attachments are marked with blue background color. * Version 1.60 o Added /start command-line option, which instructs OutlookAttachView to start the mailbox scan immediately with the loaded configuraion, without displaying the Scan Options dialog-box. o Decreased the memory consumption when the list of found attachments is very large. * Version 1.57 o Added new option to specify the list of folders that you wish to skip (comma-delimited list). * Version 1.56 o Added 'Mark Odd/Even Rows' option, under the View menu. When it's turned on, the odd and even rows are displayed in different color, to make it easier to read a single line. * Version 1.55 o Added new option to specify the list of folders that you wish to scan (comma-delimited list), instead of scanning the entire mailbox. * Version 1.51 o Added 'Open Selected Attachment With...' option, which allows you to quickly view the content of the attachment with another application, instead of the default one. * Version 1.50 o Added 'Open Selected Attachment' option (F7), which allows you to quickly view the content of the attachment, without the need to extract the file and then open it from Explorer. Be aware that when you use this option, OutlookAttachView extracts the attachment into a temporary folder, and then opens it with the default application, according to the file extension. When you close OutlookAttachView, all temporary attachment files are automatically deleted. o Added to option to choose what to do when you double-click on a single attachment: Open Properties Window, Open Outlook Message, or Open Attachment File. * Version 1.47 o The status bar now displays the total size of selected attachments in KB/MB. * Version 1.46 o You can now send the attachments list to stdout by specifying an empty filename ("") in the command-line. (For example: OutlookAttachView.exe /stab "" > c:\temp\att.txt) * Version 1.45 o Add new filter: Scan only emails that their subject contains the specified string. * Version 1.41 o Added option to exclude one or more file extensions from the attachments list (in comma-delimited list). * Version 1.40 o Added Extension column, so now you can easily sort the list by the file extension of the attachments. o Added option to filter the attachments list by file extension - you can now specify the list of file extensions (in comma-delimited list) that you want to find. All attachments with file extensions that are not in the list won't be displayed. * Version 1.37 o Added /cfg command-line option for loading the configuration from another .cfg file. * Version 1.36 o Added %message_size% and %folder_path% (full folder path) variables to the attachment filename format. * Version 1.35 o Added an option to control the filename format for extracting the attachments. (In the 'Copy Selected Files To...' window) You can include the following fields in the created filename: Subject, From, To, Attachment Name, Folder Name, Message Date, and Message Time. o Added 'Set the modified time of the file to the time of the message' option. When it's turned on, the extracted attachment file will get the same modified time of the message that contains the attachment. * Version 1.30 o Added 'Email Software' column, which displays the email software that was used to send the message. The value is taken from x-mailer header line. This column is only relevant for received messages (Inbox). o Added 'Computer Address' column, which displays the computer name or IP addresses that sent the message. This column is only relevant for received messages (Inbox). * Version 1.25 o Added a new option to 'Mailbox Scan Options', which allows you to scan another profile of Outlook, instead of the default one. o Added 'Add Header Line To CSV/Tab-Delimited File' option. When this option is turned on, the column names are added as the first line when you export to csv or tab-delimited file. * Version 1.21 o Added support for embedded message attachments (attachments of another message). These attachments are saved as .msg files. * Version 1.20 o Added option to filter by attachment size. o Fixed issue: removed the wrong encoding from the xml string, which caused problems to some xml viewers. * Version 1.15 o Added 'MailBox Scan Options' window, which allows you to choose the dates range to scan. o Fixed bug: The 'Created On' column displayed wrong dates in some Outlook configurations. * Version 1.13 o Added 'Copy Selected Attachments To...' into the right-click context menu. Also, changed the 'Save Selected Items' to 'Export Attachments Information', to avoid the confusion between saving the attachment files and exporting the attachments details. o Added separated x64 version - for using only with x64 version of Outlook 2010. * Version 1.12 o Fixed a crash problem when using this utility with IMAP accounts. * Version 1.11 o Added sorting command-line options. * Version 1.10 o Added 'Open Message In Outlook' option. * Version 1.06 o Added 'Clean Selected Attachments' option - clean the content of attachment, but without removing the attachment entry. * Version 1.05 o Fixed bug: OutlookAttachView failed to scan sub-folders under main Outlook folders. o Added 'Folder Path' column. * Version 1.00 - First release. Using OutlookAttachView ======================= OutlookAttachView doesn't require any installation process or additional dll files. In order to start using it, simply run the executable file - OutlookAttachView.exe If you have only one profile in your Outlook, and this profile doesn't require any password, you can run OutlookAttachView even without starting Outlook, and it'll automatically scan the mailbox of your current Outlook profile. Otherwise, it's recommended to open Outlook in the right profile before starting OutlookAttachView. After running OutlookAttachView, the 'MailBox Scan Options' window will be displayed. This window allows to choose to scan your mailbox only in specific dates range. After choosing 'Ok' in the options window, OutlookAttachView starts to scan your Outlook messages and display the found attachments in the main window of OutlookAttachView. If you want to stop the scan process, simply choose the 'Stop' menu. After the scanning process is finished, you can select one or more of your attached files, and copy them into the desired folder, by using the 'Copy Selected Files To' option. If have large attachments that you want to delete, you can use the 'Delete Selected Attachments' option. Be aware that when you use the delete option, only the attachment file is deleted. The message itself remains on your mailbox. You can also use the 'Clean Selected Attachments' option to clean most of the attachment content, but without removing the attachment entry. If you use this option, you'll still see the attachment listed in your email message with small file size, but saving this attachment to a file will create a corrupted file. Inline Attachments ================== Attachments embedded as a part of the message body are detected as 'Inline Attachments'. By default, OutlookAttachView doesn't displays these inline attachments. If you can't find the attachments you're looking for, you should try to turn on the 'Show Inline Attachments' option, located under the Options menu. Control The Filename Format of Extracted Attachment =================================================== When you extract one or more attachments from your Outlook mailbox, you can control the way that the attach filename is generated. By default, OutlookAttachView use the following format: %attach_name%.%extension%, which means that the generated filename will only contain the original attachment name and the file extension. However, you can also use the following special variables to format the filename according to your needs: * %attach_name% - The original name of the attachment. * %extension% - The original file extension of the attachment. * %subject% - The subject of the email contains this attachment. * %folder_name% - The folder name of this email (Inbox, Sent Items, and so on) * %from% - The sender of the email. * %to% - The 'To' field of the email. * %message_date% - Message creation date in yyyymmdd format. * %message_time% - Message creation time in HHmmss format. * %message_size% - Attachment size, in bytes. * %folder_path% - Full folder path of this email. (For example: Personal Folder-Inbox) * %msgdate:[format]% - Message creation date (GMT), in any format you need, for example: %msgdate:yyyyMMdd% , %msgdate:ddMMyy% * %msgtime:[format]% - Message creation time (GMT), in any format you need, for example: %msgtime:HHmmss% * %localmsgdate:[format]% - Message creation date (local time), in any format you need, for example: %localmsgdate:yyyyMMdd% , %localmsgdate:ddMMyy% * %localmsgtime:[format]% - Message creation time (local time), in any format you need, for example: %localmsgtime:HHmmss% For example: If you want to generate the attachment filename with the subject, folder name, and attach name: %folder_name%_%subject%_%attach_name%.%extension% Be aware that some of the values are automatically truncated after 64 characters, in order to avoid from over-sized filenames. Scanning Outlook Attachments of External PST Files ================================================== If you want to search an attachment in one or more PST files that are not loaded in your Outlook profile, you can use the following trick: 1. Go to Control Panel -> Mail and choose 'Show Profiles' 2. Click 'Add' to create a new profile. 3. Fill the email account information with faked details (You can delete it afterwards) 4. After the profile is created, double click on the profile, and in the profile properties, click 'Data Files' and add the desired PST files that you wish to scan. 5. Also, you can click the 'E-mail Accounts' button, and remove the faked account that you previously created. 6. In the Mailbox Scan Options of OutlookAttachView, choose 'Allow me to choose the profile' in the Outlook Profile option. 7. When you are asked to choose the profile, you should choose the profile that you created, and OutlookAttachView will scan the PST files that you added into it. Command-Line Options ==================== /stext Save the list of all Outlook attachments into a regular text file. /stab Save the list of all Outlook attachments into a tab-delimited text file. /scomma Save the list of all Outlook attachments into a comma-delimited text file. /stabular Save the list of all Outlook attachments into a tabular text file. /shtml Save the list of all Outlook attachments into HTML file (Horizontal). /sverhtml Save the list of all Outlook attachments into HTML file (Vertical). /sxml Save the list of all Outlook attachments to XML file. /SaveDirect Save the Outlook attachments in SaveDirect mode. For using with the other save command-line options ( /scomma, /stab, /sxml, and so on...) When you use the SaveDirect mode, the attachments list is saved directly to the disk, without loading them into the memory first. This means that you can save a list with large amount of attachment lines into your disk without any memory problem, as long as you have enough disk space to store the saved file. The drawback of this mode: You cannot sort the attachments according to the column you choose with /sort command-line option. /sort This command-line option can be used with other save options for sorting by the desired column. If you don't specify this option, the list is sorted according to the last sort that you made from the user interface. The parameter can specify the column index (0 for the first column, 1 for the second column, and so on) or the name of the column, like "Filename" and "Subject". You can specify the '~' prefix character (e.g: "~Subject") if you want to sort in descending order. You can put multiple /sort in the command-line if you want to sort by multiple columns. Examples: OutlookAttachView.exe /shtml "f:\temp\attach.html" /sort 2 /sort ~1 OutlookAttachView.exe /shtml "f:\temp\attach.html" /sort "From" /sort "To" /sort "Subject" /nosort When you specify this command-line option, the list will be saved without any sorting. /cfg Starts OutlookAttachView with the specified configuration file instead of the default OutlookAttachView.cfg /start Starts the mailbox scan immediately with the loaded configuraion, without displaying the Scan Options dialog-box. /extractall Extracts all Outlook attachments from command-line, according to your last settings saved in the default .cfg file, or according to other configuration file that you load with /cfg command-line option. You can also use the following command-line options to change any configuarion value you wish: /CopyFilesFolder /NewNameIfExist /UpdateModifiedTimeMessage /FilenameFormat /ScanOptions.TimeZone /ScanOptions.OutlookProfile /ScanOptions.UseExtensionsList /ScanOptions.ExtensionsList /ScanOptions.UseExcludeExtensionsList /ScanOptions.ExcludeExtensionsList /ScanOptions.UseSubjectContains /ScanOptions.SubjectContains /ScanOptions.ScanOnlyFolders /ScanOptions.ScanFoldersList /ScanOptions.SkipFolders /ScanOptions.SkipFoldersList /ScanOptions.DateFrom /ScanOptions.DateTo /ScanOptions.UseDateRange /ScanOptions.OutlookProfileString /ScanOptions.UseFromList /ScanOptions.FromList /ScanOptions.UseToList /ScanOptions.ToList /ScanOptions.UseOnlyLastDays /ScanOptions.OnlyLastDays For example, if you want to extract all attachments into c:\myattach instead of using the folder specified in the config file: OutlookAttachView.exe /CopyFilesFolder "c:\myattach" /extractall Translating OutlookAttachView to other languages ================================================ In order to translate OutlookAttachView to other language, follow the instructions below: 1. Run OutlookAttachView with /savelangfile parameter: OutlookAttachView.exe /savelangfile A file named OutlookAttachView_lng.ini will be created in the folder of OutlookAttachView utility. 2. Open the created language file in Notepad or in any other text editor. 3. Translate all string entries to the desired language. Optionally, you can also add your name and/or a link to your Web site. (TranslatorName and TranslatorURL values) If you add this information, it'll be used in the 'About' window. 4. After you finish the translation, Run OutlookAttachView, and all translated strings will be loaded from the language file. If you want to run OutlookAttachView without the translation, simply rename the language file, or move it to another folder. License ======= This utility is released as freeware. You are allowed to freely distribute this utility via floppy disk, CD-ROM, Internet, or in any other way, as long as you don't charge anything for this. If you distribute this utility, you must include all files in the distribution package, without any modification ! Disclaimer ========== The software is provided "AS IS" without any warranty, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The author will not be liable for any special, incidental, consequential or indirect damages due to loss of data or any other reason. Feedback ======== If you have any problem, suggestion, comment, or you found a bug in my utility, you can send a message to [email protected]
### 回答1: nmi watchdog: bug: soft lockup是一种系统错误,通常是由于CPU在执行某个任务时出现了死锁或死循环导致的。这种错误会导致系统无响应,需要重新启动才能恢复正常。建议检查系统的硬件和软件配置,以及运行的程序是否存在问题,尝试升级系统内核或驱动程序,以解决这个问题。 ### 回答2: nmi watchdog: bug: soft lockup是一种Linux系统的错误报告,通常会在系统莫名其妙的卡死,无法进行任何操作时出现。其中nmi代表非屏蔽中断,watchdog代表看门狗,soft lockup则表示软件死锁。 软件死锁是指两个或多个进程或线程无限期等待对方的资源而无法继续前进,导致程序陷入死循环。当系统检测到了这种情况时,watchdog会发出nmi中断以唤醒内核监视程序来检查问题,但是如果监视程序本身也出现了问题,就会导致系统崩溃。 造成这种错误的原因可能是因为程序编码问题,或者硬件故障。解决这个问题的方法包括: 1. 观察系统日志,找到软死锁发生的位置。 2. 检查系统硬件,并排除可能的故障。 3. 修改程序代码,避免死锁的发生。 4. 增加timeout的时间,即在发现软死锁后,等待一定时间再做处理,而不是立即终止程序。 总之,解决nmi watchdog: bug: soft lockup错误需要对系统进行全面的检查和分析,找到问题的根源,并采取相应的措施进行修复,以确保系统的正常运行。 ### 回答3: nmi watchdog: bug: soft lockup,是一种常见的Linux内核错误提示,通常会在系统崩溃或死锁时出现。该错误信息通常意味着内核子系统未能在规定的时间内响应。 首先,需要理解NMI(不可屏蔽中断)和watchdog(看门狗)的概念。NMI是一种机器级硬件中断,是一种极为紧急的中断,可以打断CPU正在执行的任何代码。在系统遇到紧急错误时,NMI可以帮助系统立即停止正在执行的代码,进入调试模式。watchdog(看门狗)是一种硬件或软件机构,能监控系统运行状态及时间,一旦系统停止响应,看门狗会强制重启系统,以确保系统始终处于正常可用状态。 当系统出现soft lockup时,意味着内核子系统未能在规定的时间内完成需求,或者遇到了无法恢复的错误,导致系统停止响应。这时,看门狗可以发现系统运行异常,以防止系统进一步崩溃,并触发一个不可屏蔽中断(NMI)打断CPU操作,以便进行系统诊断和错误排查。 通常情况下,nmi watchdog: bug: soft lockup将会显示一些错误信息,例如调用堆栈、内存释放、CPU信息等等,用于指示操作系统开发人员进行问题诊断和排查。如果这些错误信息无法排查问题,还需要进一步检查单个进程或硬件问题,或者重新编译更稳定的内核版本。 总的来说,NMI和watchdog是帮助系统监测和检测系统运行状态的有用工具,系统出现nmi watchdog: bug: soft lockup错误信息时,需要针对错误提示进行系统分析和问题排查,以解决系统停止响应等问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值