dump

WinDbg to create dump file upon crash?

佐手、 提交于 2019-12-21 05:41:24
问题 We're having an exception with our application. Using Dr.Watson we didn't capture any dmp as well log files. I'm told, WinDbg is an alternative to create dump files upon exceptionn/crash of a program. After a googling, I come across a piles of confusion. First of all, I'd like to confirm, whether it is possible, to creat dump files with help of WinDbg. Second, is there any recommended simple command lines to attach WinDbg to an application to get the dump files upon its crash? Thanks alot!

How to properly save Common Lisp image using SBCL?

馋奶兔 提交于 2019-12-20 20:40:35
问题 If I want to create a Lisp-image of my program, how do I do it properly? Are there any prerequisites? And doesn't it play nicely with QUICKLISP? Right now, if I start SBCL (with just QUICKLISP pre-loaded) and save the image: (save-lisp-and-die "core") And then try to start SBCL again with this image sbcl --core core And then try to do: (ql:quickload :cl-yaclyaml) I get the following: To load "cl-yaclyaml": Load 1 ASDF system: cl-yaclyaml ; Loading "cl-yaclyaml" ....... debugger invoked on a

开启Kdump捕捉内核崩溃信息

纵饮孤独 提交于 2019-12-20 20:07:48
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 首先安装必选包: apt-get -y install aptitude kdump-tools crash kexec-tools makedumpfile linux-image-`uname -r`-dbg aptitude full-upgrade # 避免运行的内核版本与调试的版本不一致导致无法调试 Kdump配置文件 /etc/default/kdump-tools 关键部分 USE_KDUMP=1 KDUMP_SYSCTL="kernel.panic_on_oops=1" KDUMP_KERNEL=/boot/vmlinuz-3.16.0-4-amd64 KDUMP_INITRD=/boot/initrd.img-3.16.0-4-amd64 KDUMP_COREDIR="/data/crash" KDUMP_FAIL_CMD="reboot -f" DEBUG_KERNEL=/usr/lib/debug/vmlinux-3.16.0-4-amd64 MAKEDUMP_ARGS="-c -d 31" KDUMP_CMDLINE="crashkernel=512M" crashkernel大小配比, 正常情况崩溃后1分钟左右会自动重启、配置不正确会导致重启卡住黑屏不动 。 内存大小

Dumping whole array: console.log and console.dir output “… NUM more items]”

妖精的绣舞 提交于 2019-12-20 10:32:07
问题 I am trying to log a long array so I can copy it quickly in my terminal. However, if I try and log the array it looks like: ['item', 'item', >>more items<<< ... 399 more items ] How can I log the entire array so I can copy it really quickly? 回答1: Setting maxArrayLength There are a few methods all of which require setting maxArrayLength which otherwise defaults to 100. Provide the override as an option to console.log or console.dir console.log( myArry, {'maxArrayLength': null} ); Set util

How to dump part of binary file

百般思念 提交于 2019-12-20 09:39:32
问题 I have binary and want to extract part of it, starting from know byte string (i.e. FF D8 FF D0) and ending with known byte string (AF FF D9) In the past I've used dd to cut part of binary file from beginning/ending but this command doesn't seem to support what I ask. What tool on terminal can do this? 回答1: In a single pipe: xxd -c1 -p file | awk -v b="ffd8ffd0" -v e="aaffd9" ' found == 1 { print $0 str = str $0 if (str == e) {found = 0; exit} if (length(str) == length(e)) str = substr(str, 3)

Dump text to file with line breaks

随声附和 提交于 2019-12-20 04:50:42
问题 private void btnDump_Click(object sender, EventArgs e) { using (StreamWriter sw = new StreamWriter("E:\\TestFile.txt")) { // Add some text to the file. sw.WriteLine(txtChange.Text); } } This dumps the text of txtChange to a text file. txtChange is a Rich text box and has line breaks (new lines) in it. When the user clicks the Dump button all the text is Dumped but not on new lines. E.g. txtChange looks like 1 2 3 4 dumping the text looks like 1234 How do i format the dumping of the text so

在CMD下备份和恢复Mysql数据库

空扰寡人 提交于 2019-12-19 19:53:28
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> ###dbName:需要备份的数据库名字 ###E:\dump\20130820.sql : 备份文件的存放地址 ###需要指定连接地址请在参数里面加上 -h 127.0.0.1 ###需要指定连接端口请在参数里面加上 -P 3306 ###需要指定备份的编码请在参数里面加上 --default-character-set=utf8 ###备份数据库 mysqldump -h 127.0.0.7 -u root -p dbName --set-gtid-purged=OFF --default-character-set=utf8 > E:\dump\20130820.sql ###恢复数据库 mysql -u root -p dbName --default-character-set=utf8 < E:\dump\20130820.sql 如果出现错误:mysqldump: Couldn't execute 'SELECT @@GTID_MODE': Unknown system variable 'GTID_MODE' (1193) 就用: mysqldump -h 127.0.0.7 -u root -p dbName --set-gtid-purged=OFF > E:\dump\20140318

分析java程序中cpu占用过高的线程

非 Y 不嫁゛ 提交于 2019-12-19 12:29:45
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 服务器接收请求响应特别慢,用top一看,服务端的一个java服务占用cpu1800%多(24核心)。 该服务里面跑了很多线程,于是想找到是谁引起的 首先dump出该进程的所有线程及状态 使用命令 jstack PID 命令打印出CPU占用过高进程的线程栈. jstack -l 20228 > xxx.log 将堆栈信息找出来放到日志信息中 2. 使用top命令找到耗cpu的线程 使用top -H -p PID 命令查看对应进程是哪个线程占用CPU过高. 是不是很震撼,基本上所有的cpu都快满负荷运行了,这些肯定不是正常的java进程 3. 结合堆栈信息查看 进制转换网站: http://tool.oschina.net/hexconvert/ 用来将进程号转换为16进制 20230 --> 4f06 原来是触发了GC,所以请求都无法及时相应了,接下来要做的就是找找是什么触发了GC 参考: http://www.cnblogs.com/skyaccross/archive/2012/12/22/2829000.html 来源: oschina 链接: https://my.oschina.net/u/2499632/blog/688379

Indexing wikipedia dump with solr

心已入冬 提交于 2019-12-19 11:31:13
问题 I have solr 3.6.2 installed on my machine, perfectly running with tomcat. I want to index a wikipedia dump file using solr. How do I do this using DataImportHandler? Any other way? I don't have any knowledge of xml. The file I have mentioned has size of around 45GB when extracted. Any help would be greatly appreciated. Update- I tried doing whats said on the DataImportHandler page. But there is some error maybe because their version of solr is much older. My data.config- <dataConfig>

Pickle dump with progress bar

笑着哭i 提交于 2019-12-19 05:59:17
问题 I've a really big json object that I want to dump into a pickle file. Is there a way to display a progress bar while using pickle.dump ? 回答1: The only way that I know of is to define getstate/setstate methods to return "sub objects" which can refresh the GUI when the get pickled/unpickled. For example, if your object is a list, you could use something like this: import pickle class SubList: on_pickling = None def __init__(self, sublist): print('SubList', sublist) self.data = sublist def _