# Logstash is creating a csv file with 0 bytes

**URL:** <https://discuss.elastic.co/t/logstash-is-creating-a-csv-file-with-0-bytes/98097>\
**Category:** Logstash\
**Created:** [August 23, 2017, 2:30pm UTC](https://discuss.elastic.co/t/logstash-is-creating-a-csv-file-with-0-bytes/98097 "2017-08-23T14:30:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sudi\_2611](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@sudi\_2611](https://discuss.elastic.co/u/sudi_2611)\
**Post date:** [August 23, 2017, 2:30pm UTC](https://discuss.elastic.co/t/logstash-is-creating-a-csv-file-with-0-bytes/98097/1 "2017-08-23T14:30:00Z")

</div>

i am new to logstash, from few days i have noticed that logstash has started creating 0 byte file

-rw-r--r-- 1 logstash logstash 1859370519 Aug 21 19:57 fsimage  
-r--r--r-- 1 logstash logstash 0 Aug 23 09:49 fsimage.csv.1503496165  
-r--r--r-- 1 logstash logstash 0 Aug 23 09:49 fsimagedaily.csv.1503496195

-bash-4.2$ cat [parsefsimage.sh](http://parsefsimage.sh)  
export JAVA\_HOME=/usr/java/jdk1.8.0\_65/

#rm -f /etc/logstash/scripts/fsimage

#fsimage=`ls /etc/logstash/scripts/fsimage_*`  
rm -rf /etc/logstash/scripts/fsimage.csv.\*  
/etc/logstash/scripts/hadoop-2.8.0/bin/hdfs oiv -t /etc/logstash/scripts/scratch/ -delimiter "|" -p Delimited -i /etc/logstash/scripts/fsimage | sed '1d' | sed 's/"//g' |sed 's/\s//g' \> /etc/logstash/scripts/fsimage.csv.$(date +'%s')

===============================================================  
-bash-4.2$ cat [parsefsimagedaily.sh](http://parsefsimagedaily.sh)  
export JAVA\_HOME=/usr/java/jdk1.8.0\_65/  
rm -rf /etc/logstash/scripts/fsimagedaily.csv.\*  
sleep 30  
while ps aux | grep [fsimage.sh](http://fsimage.sh) | grep -qv grep; do  
sleep 5  
done  
parsedfile=`ls /etc/logstash/scripts/fsimage.csv.*`  
cp $parsedfile /etc/logstash/scripts/fsimagedaily.csv.$(date +'%s')

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 23, 2017, 9:01pm UTC](https://discuss.elastic.co/t/logstash-is-creating-a-csv-file-with-0-bytes/98097/2 "2017-08-23T21:01:22Z")

</div>

You're not out of disk space are you?

It's not clear to me what files Logstash is creating. The zero-byte files at the top of your post appear to be created by one of the shell scripts.

---

<div class="post-metadata">

**Author:** ![sudi\_2611](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@sudi\_2611](https://discuss.elastic.co/u/sudi_2611)\
**Post date:** [August 24, 2017, 12:31pm UTC](https://discuss.elastic.co/t/logstash-is-creating-a-csv-file-with-0-bytes/98097/3 "2017-08-24T12:31:54Z")

</div>

issue solve..file permission

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 21, 2017, 12:32pm UTC](https://discuss.elastic.co/t/logstash-is-creating-a-csv-file-with-0-bytes/98097/4 "2017-09-21T12:32:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
