PostGreSQL数据库检查(4)

10 篇文章 0 订阅
9 篇文章 0 订阅

<span style="font-size:18px;">现在是坐等LifeRay出现问题的时间,同时研究正常时候,PostGreSQL和LifeRay应该是什么状态。首先,数据库里面的关于PostGreSQL的进程的情况,有20个属于正常。如下:</span>
</pre><pre name="code" class="plain">
</pre><pre name="code" class="plain">Last login: Sat Oct 17 12:23:39 on console
qixiaodongdeMacBook-Pro:~ qixiaodong$ ssh davidqi@180.76.147.172
davidqi@180.76.147.172's password: 
Last login: Thu Oct 15 21:24:38 2015 from 113.46.123.89
[davidqi@david ~]$ cd /
[davidqi@david /]$ ps -elf | grep postgres
0 S postgres  1691     1  0  80   0 - 54081 poll_s Oct15 ?        00:00:02 /usr/bin/postgres
1 S postgres  1702  1691  0  80   0 - 44833 poll_s Oct15 ?        00:00:03 postgres: logger process   
1 S postgres  1704  1691  0  80   0 - 54110 poll_s Oct15 ?        00:00:23 postgres: writer process   
1 S postgres  1705  1691  0  80   0 - 54081 poll_s Oct15 ?        00:00:17 postgres: wal writer process   
1 S postgres  1706  1691  0  80   0 - 54148 poll_s Oct15 ?        00:00:05 postgres: autovacuum launcher process   
1 S postgres  1707  1691  0  80   0 - 44910 poll_s Oct15 ?        00:00:05 postgres: stats collector process   
1 S postgres 19379  1691  0  80   0 - 54821 sk_wai 11:25 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55865) idle
1 S postgres 19380  1691  0  80   0 - 54622 sk_wai 11:25 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55866) idle
1 S postgres 19426  1691  0  80   0 - 54821 sk_wai 11:40 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55878) idle
1 S postgres 19427  1691  0  80   0 - 54622 sk_wai 11:40 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55879) idle
1 S postgres 19464  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55882) idle
1 S postgres 19465  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55883) idle
1 S postgres 19466  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55884) idle
1 S postgres 19467  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55885) idle
1 S postgres 19468  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55886) idle
1 S postgres 19469  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55887) idle
1 S postgres 19470  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55888) idle
1 S postgres 19471  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55889) idle
1 S postgres 19472  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55890) idle
1 S postgres 19473  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55891) idle
1 S postgres 19474  1691  0  80   0 - 55179 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55892) idle
1 S postgres 19475  1691  0  80   0 - 54622 sk_wai 11:55 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55893) idle
1 S postgres 19529  1691  0  80   0 - 55163 sk_wai 12:10 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55899) idle
1 S postgres 19566  1691  0  80   0 - 54622 sk_wai 12:25 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55902) idle
1 S postgres 19567  1691  0  80   0 - 54622 sk_wai 12:25 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55903) idle
1 S postgres 19568  1691  0  80   0 - 54697 sk_wai 12:25 ?        00:00:00 postgres: postgres lportal 127.0.0.1(55904) idle
0 S davidqi  19601 19578  0  80   0 - 25814 pipe_w 12:27 pts/0    00:00:00 grep postgres
[davidqi@david /]$ 
</pre><pre name="code" class="plain">
<span style="font-size:18px;">下面看看比较文本的RPM包如何正确安装。</span>
</pre><pre name="code" class="plain">[root@david /]# find -name bcompare-4.1.1.20615.x86_64.rpm
[root@david /]# Write failed: Broken pipe
qixiaodongdeMacBook-Pro:~ qixiaodong$ 


刚在不知道什么原因,终端不响应了,网站也接不上,只好全部都退出重来。后来觉得可能是通信中断的原因。




[root@david Downloads]# rpm -ivh bcompare-4.1.1.20615.x86_64.rpm 
warning: bcompare-4.1.1.20615.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7f8840ce: NOKEY
error: Failed dependencies:
	qt-x11 is needed by bcompare-4.1.1-20615.x86_64
	/usr/bin/pdftotext is needed by bcompare-4.1.1-20615.x86_64

自己通过yum去安装需要的2个软件先。


[root@david Downloads]# yum install qt-x11

[root@david Downloads]# yum install xpdf

[root@david Downloads]# rpm -ivh bcompare-4.1.1.20615.x86_64.rpm 
warning: bcompare-4.1.1.20615.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7f8840ce: NOKEY
Preparing...                ########################################### [100%]
   1:bcompare               ########################################### [100%]
/var/tmp/rpm-tmp.c2GGYp: line 103: kde4-config: command not found
[root@david Downloads]# yum install kde4-config
Loaded plugins: fastestmirror, refresh-packagekit, security, versionlock
Loading mirror speeds from cached hostfile
scootersoftware                                                                                       |  951 B     00:00     
scootersoftware/primary                                                                               | 1.1 kB     00:00     
scootersoftware                                                                                                          1/1
Setting up Install Process
No package kde4-config available.
Error: Nothing to do
[root@david Downloads]# 

虽然有一个kde4-config好像有问题,通过yum也没有找到。好在不影响安装成功。






到处今日的数据库备份到文本文件(又需要去改新建的子目录的权限,下次研究如何不用每次都修改。),并比较。




接下来仔细研究一下这些变化(都是正常情况下的数据库备份)。再和异常情况比较。


(接下来带女儿糯糯去捡树叶,完成幼儿园的作业)


===================================

用sudo -u username的方法,可以解决上面的“需要去改新建的子目录的权限”的问题。如下:


[root@david davidqi_DB_backup]# sudo -u davidqi mkdir 20151018
[root@david davidqi_DB_backup]# ls -lh
总用量 3.4M
drwxrwxr-x 2 davidqi davidqi  4.0K 10月 16 16:52 2015
drwxrwxr-x 2 davidqi davidqi  4.0K 10月 16 16:52 20151016
drwxr-xr-x 2 davidqi postgres 4.0K 10月 17 14:17 20151017
drwxr-xr-x 2 davidqi davidqi  4.0K 10月 17 15:19 20151018
-rw-rw-r-- 1 davidqi davidqi  618K 10月 16 15:29 correct_20151016_Custom
-rw-rw-r-- 1 davidqi davidqi  1.1M 10月 16 17:07 correct_20151016_Plain
-rw-rw-r-- 1 davidqi davidqi  1.7M 10月 16 15:30 correct_20151016_Tar


再BCE的VNC上直接用Beyond Compare来比较了2个正常的数据库的内容。主要有3类:

(1)数据库备份的开始和结束时间。各占一项共2项。

(2)用户的清单(user_),占用不同的行,(因为同一个用户又有新的访问,lastlogindate, lastloginip等不同),也是可以理解的。

(3)网页内容的清单(assetentry),占用不同的行,因为同一个用户又有新的访问,访问的次数viewcount不同了。


以上这些都是正常的不同。不正常的LifeRay对应的数据库的记录,需要看看,找找是否有问题。另外,因为安装了Beyond Compare,可以比较文件夹,所以也可以比较不正常时的文件系统的LifeRay的部分。话说这个Beyond Compare还真是挺好用的。就嫌屏幕太小了。




==================

早上好,又导出了数据库备份的Plian文件,比较了一下,发现一个新的改变:Browsertracker组里面的browerkey。这个属于正常。


开始研究有误的那个数据库的数据,和18日的相比,除了上述的区别,还有的区别有:

release_(干什么用的?


dlfilerank(下载文件的排名?)



dlfileentry(下载文件的入口)


counter干什么用的?



但是这些区别看起来也属于正常似的。现在猜测可能是文件系统中出了问题。

















  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值